This article provides practical examples for 50 most frequently used commands in Linux / UNIX. This is not a comprehensive list by any means, but this should give you a jumpstart on some of the common Linux commands. Bookmark this article for your future reference. Did I miss any frequently...
More kill examples:4 Ways to Kill a Process – kill, killall, pkill, xkill 27. rm command examples Get confirmation before removing the file. AI检测代码解析 $ rm -i filename.txt 1. It is very useful while giving shell metacharacters in the file name argument. Print the filename and get...
More ssh examples: 5 Basic Linux SSH Client Commands 5. sed command examples When you copy a DOS file to Unix, you could find \r\n in the end of each line. This example converts the DOS file format to Unix file format using sed command. $sed 's/.$//' filename P...
How to run multiple commands with xargs It is possible to run multiple commands with xargs by using the -I flag. This replaces occurrences of the argument with the argument passed to xargs. The following echos a string and creates a folder.cat...
Execute commands on files found by the find command $ find -iname "MyCProgram.c" -exec md5sum {} \; Find all empty files in home directory # find ~ -empty More find examples: Mommy, I found it! — 15 Practical Linux Find Command Examples 4. ssh command examples Login to remote host...
awk operates on a per-line basis, executing actions or commands based on patterns defined within the program. Its concise syntax and built-in functionalities make it an invaluable tool for data extraction, formatting, and reporting within the Unix/Linux command-line environment. ...
Tutorial on using exit codes from Linux or UNIX commands. Examples of how to get the exit code of a command, how to set the exit code and how to suppress exit codes. Exit codes in Unix and Linux August 7, 2016 UpdatedSeptember 19, 2024 ...
Before you start the next section, you may like to clear the terminal window of the previous commands so the output of the following commands can be clearly understood. At the prompt, type clear This will clear all text and leave you with the % prompt at the top of the window. ...
Related Commands What is e2fsck? Check ext2, ext3, or ext4 filesystems. 5 e2fsck Examples 1. Check a partition You should be root to execute this command. If not, you’ll get the following error message. $ /sbin/e2fsck /dev/sdb1 ...
Related Commands What is cc? The cc compiler is the default compiler for Unix systems like Sun solaris. This is a powerful compiler used for compilation of C code. 5 cc Examples 1. A basic example Compiling a C code with cc compiler is very easy. For a very basic case, just pass the...