Linux Command Daquan

1.ls – List

ls will list the contents (files or folders), just like you open a folder to see the contents inside the GUI as the current working directory.

 

 

 

2.mkdir – Make Directory

mkdir to create a new directory

 

 

 

3.pwd – Print Working Directory

pwd Displays the current working directory

 

 

 

4.cd – Change Directory

For the current terminal will be in the running, cd given folder (or directory) set to the current working directory.

 

 

 

5.rmdir – Remove Directory

rmdir remove the given directory.

 

 

 

6.rm – Remove

rm will remove a given file or folder, you can use the rm -r recursively delete a folder

 

 

 

7.cp – Copy

cp command to copy a file or folder, you can use cp -r option to recursively copy a folder.

 

 

 

8.mv – MoVe

mv command moves a file or folder, if the file or folder exists in the current working directory, you can also file or folder to rename.

9.cat – concatenate and print files

cat for viewing on the standard output (monitor or screen) file content

10.tail – print TAIL (from last) >

tail default display on standard output line 10 to the final contents of the given file, -n N tail can be used to display the last N rows of the specified content file on the standard output.

11.less – print LESS

less by page or print the file contents by the window. When viewing large files containing large amounts of text data is a very useful and efficient. You can use the page forward Ctrl + F, Ctrl + B Scrolls back.

 

 

 

12.grep

grep "" Search string specified in the given file. grep -i "" ignore case in the search string, and grep -r "" will recursively search string specified in the current working directory in the file.

 

 

 

13.Find

This command will search for files in a given location that match the criteria. You can use the find -name -name option to perform case-sensitive search, find -iname be case-insensitive search.

find <folder-to-search> -iname <file-name>

 

 

 

14.tar

tar command to create, view, and extract the tar archive. tar -cvf <archive-name.tar> is to create a corresponding compressed file, tar -tvf <archive-to-view.tar> to view the corresponding compressed files, tar -xvf <archive-to-extract.tar> to extract the corresponding compression file.

 

 

 

15.gzip

gzip gzip command creating and extracting compressed files, you can also use gzip -d to extract compressed files.

 

 

 

16.unzip

unzip <archive-to-extract.zip> gzip file to decompress. Prior to unpack, you can use unzip -l <archive-to-extract.zip> command to view the contents of the file.

 

 

 

17.help

--help lists all available commands in the terminal, you can use any command -h or -help option to see specific usage for the command.

 

 

 

18.whatis – What is this command

whatis single line will be used to describe the given command.

19.man – Manual

man will be given the command displays a manual page.

 

 

 

20.exit

exit to end the current terminal session.

 

 

 

21.ping

ping ping packet a remote host (server) via a data transmission, and commonly connected to the detection network server status.

 

 

22.who – Who Is logged in

who can list the user name currently logged on.

 

 

23.su – Switch User

su for switching different user. Even without using a password, the superuser can switch to other users.

 

 

24.uname

uname displays important information about the system, such as the kernel name, host name, kernel version, processor type, etc., use uname -a You can view all the information.

 

 

25.free – Free memory

will show the system free of free memory, already occupied memory, available memory, and other information exchange, the free -m result is converted into the unit KB, the conversion into the free -g GB.

 

 

26.df – Disk space Free

df view the file system disk usage - Hard used and available storage space, and other storage devices. You can use df -h The results are displayed in human-readable way.

 

 

27.ps – ProcesseS

ps display running processes of the system.

 

 

28.Top – TOP processes

The top command by default in accordance with the occupancy of the CPU, display a larger footprint process, you can use the top -u to see the CPU usage of a user's ranking.

 

 

29.shutdown

shutdown for closing the computer, restart the computer for shutdown -r.

 

Guess you like

Origin www.cnblogs.com/DreamLiFeng/p/11758652.html