linux most useful command: cat command, strings command, cp command, mv command, which command etc.
1. Display file contents:
| Command |
Descriptions |
| cat |
Displaying the Contents of Text Files |
| tac |
Displaying the Contents of Text Files in reverse
order |
| head |
Displaying the Contents of Text Files the first
10 lines |
| tail |
Displaying the Contents of Text Files the final
10 lines |
| strings |
Displaying the contents of binary files |
| od |
Displaying the contents of the file in octal
format |
| more |
Displaying the Contents of Text Files
page-by-page |
| less |
like more command, but more than more command |
Managing files and directories:
| Command |
Descriptions |
| mkdir |
create directory |
| mv |
move or rename files and directory |
| cp |
copy files and directory |
| rm |
remove files |
| rmdir |
remove empty directory |
Note: cp, rm, rmdir commands using option -R to recursive copy directories, to remove a directory full of files. rm command with -R is dangerous.
Finding files:
| Command |
Descriptions |
| locate |
fastest to search for files in linux directory tree |
| find |
slower to search for files,but useful. |
| which |
To search the directories in the PATH variable |
Note: to see content of a certain variable in memory using echo $PATH.
Update later:
Copyright by: www.linuxoperatingsystem.info http://goo.gl/kMscJ4
0 comments:
Post a Comment