Some Useful CommandsThe tables below list some of the most useful Linux commands. The tables show the command name, what the command does, and where to find more information. In addition, sort and grep, two of the more flexible commands, are documented in this chapter to show the use of complex commands.Linux commands can be used on the command line or in shell scripts, programs that perform tasks in the Linux shell. Creating shell scripts is discussed in Chapter 19.Chapter 9 | ||
cd | Change current directory. | Chapter 9 |
chgrp | Change the group owner for a file. | Chapter 9 |
chmod | Change the permissions of a file. | Chapter 9 |
chown | Change the owner of a file. | Chapter 9 |
cp | Copy file or directory. | Chapter 9 |
diff | Compare the contents of two files. | Chapter 9 |
diff3 | Compare the contents of three files. | Chapter 9 |
find | Find a file on your hard disk. | Chapter 9 |
grep | Find a file with specified contents. | Chapter 9 |
less | Display the contents of a file on the screen, one page at a time. | Chapter 9 |
ls | List the file names of files in a directory. | Chapter 9 |
mkdir | Create a new directory. | Chapter 9 |
mv | Change the location of a file. Can be used to change the name of a file. | Chapter 9 |
pwd | Show the path to the current directory. | Chapter 9 |
rmdir | Remove a directory. | Chapter 9 |
touch | Update the last access/modification dates of a file. | Chapter 9 |