Linux # Command Memo 1
pwd
show your directory
clear
clear the terminal
drwxr?
- d:directory
- r:read
- w:write
- x:execute
- r:read
ls
list all the things in the directory
-
ls /usr/
- list the things inside usr directory
-
ls ..
- list out a back directory
-
ls -l
- display in long format
-
ls -a
- show the hidden things also
-
ls -la
- list in long format and show the hidden things also
-
ls -lS
- list the item and sort by Size
-
ls -l *txt
- list the item with .txt only
-
ls -lS >path
- list the item and sort by Size and output the result to file as path.
-
ls -d */
- list all directory
-
man ls
cd
Change directory
- cd ~
- go back to home directory
- cd ..
- cd /your path
- go to directory that you want to
cat
-
cat
- enter somethings and it will echo back Ctrl+D to End
-
cat yourpath.files
- show the file
-
cat yourfile1 yourfile
- show the files
-
cat -b yourfile
- show and add the line numbers on the non-blank line
-
cat -n yourfile
- show and add the line numbers on all the lines.
-
cat -s yourfile
- show your files and decrease all the blank line to one line
-
cat -E yourfile
- show your files and add $ symobl on each of end line.!