1, echo “aa” test. TXT and echo “bb” test. TXT // empty the original file and add the contents to the file, and add the contents to the end of the file

2, chmod go+w -r /home/zhangy// Add write permission to the group user and other users

3, tar -tzvf test.tar.gz // Lists the archived content

4, du -ah // Check the file list size

5, du -sh // View the total size of all files

6, echo ‘1 + 2’ | BC – l / / math

7, uname -a // Check some information about the Linux kernel

8, badblocks -s /dev/sda // Displays the progress of bad track scanning

9, time command // View the command running time

10, ls-lrt // Sort in reverse chronological order

11, rsync -p // Displays the synchronization progress

12. History -c // Clear the history command

13, CD – // Return to the last directory

14, tree // Displays the directory tree

15, umount -n/MNT /hda2 // Forcibly unmount

16, echo ~/ // Displays the user’s home directory

Echo $[5*5] //

Echo $((5*5)) //

19, eval ls; Ps aux | grep HTTPD / / these two commands can be executed

20, free-m // Displays memory in MB units

Uptime // displays how long the system has been running. It displays the following information in order: the current time, how long the system has been running, how many users are logged in, and the average load of the system over the past 1 minute, 5 minutes, and 15 minutes

22. Addition

[root@krlcgcms01 mytest] # let a=34+3;

[root@krlcgcms01 mytest] # echo $a;

Export // View all environment variables

24, echo $PATH // View a single variable

25, CMP file1 file2 // File content comparison

26, clear // Clear screen

27, echo 23423 | awk – re – interval ‘/ [0-9] {3} /’ / / if not re – interval, don’t show

28, CAL // Get a neat calendar format

29, wc-l // count lines, wC-w count words

30, echo “AaDCbd23 |” tr “[a-z]” smaller “[a-z]” capitalized, echo “AaDCbdc23” | tr – b – d = c will replace string = b – d

31, echo “asdf” | iconv -f UTF8 -t GBK / / convert characters by UTF8 to GBK – f is the from and shorthand, -t as terminal shorthand

32, cat -n file // the line number is displayed before the content

33, chattr + I file // read-only, root cannot modify it

34, lsattr file // View file properties

35, cat/etc/passwd | awk – F: ‘} {print $1 / / check all users in the system

36. Cat /etc/group// View all groups in the system

37, groups // Query all groups of the current user

Usermod -g usermod -g PHP usermod -g mysql usermod -g PHP usermod -g mysql usermod -g PHP usermod -g mysql usermod -g PHP usermod -g mysql usermod -g PHP

39, usermod -g usermod -g PHP usermod -g mysql usermod -g PHP usermod -g mysql

40, BC // Get into the math

41, umask 003 u permission is 7, g permission is 7, other users are 4, namely 774,777-003 =774

42, MKFS -t vfat /dev/hda6 // Format a partition in the removable disk into VFAT format

43, mount /dev/cdrom /media/cdrom // to mount cdrom

44, getent group 532 // Query group information by group ID

45, last // Records of successful login users

46, lastb // Record of unsuccessful login user

Dump -s /dev/sda2 // dump -s /dev/sda2

48, dump-0j -f /dev/hda2/sda2_bak.dump.bz2 /dev/sda2 // Back up and compress sda2

49, restore -t -f /dev/hda2/sda2_bak.dump // View backup information

50, restore -r -f /dev/hda2/sda2_bak.dump // restore backup

51, fc-list // Check the fonts installed in the system

52, the find. / -type f -exec grep -q “root” {}; -exec echo {} ; // Find the string contained in the file in the directory

Vmstat 5 // Displays system information every 5, such as CPU, memory, I/O, etc

54, shift + P indicates the order of processes occupied by top

55, shift + M after top memory order display

56, iptraf -g // View the traffic of each interface

57, ostat -d -x /dev/sda2 2 // Run the iostat command to check the disk I/O status of /dev/sda2 and refresh the information every two seconds

58, paste – sd ‘| | | n’ test / / file every 4 line into 1 line, separated with a |

59, lsof -i: 22 // what program is currently running on port 22

60, lsof -c ABC // displays the file currently open by the ABC process

61, lsof -p 12

63, route // Query the route information

64, ifup // Enable the nic

65, ifDown // Disable the nic

66, route del-net 172.168.0.0 netmask 255.255.0.0 dev eth0 // Delete the 172.168 network segment

67, route add -net 172.168.10.0 netmask 255.255.255.0 dev eth0 // Add a route

68, netstat -tunl // Lists the listening network service ports

69, netstat-tun // Lists the connected network service ports

70, nmap-sp 172.30.4.0/24 // How many users in this network segment are operating on my host, a good security check tool

71, vgdisplay / / view space available in a system | ethical film, www.akdy.cn

72, lvextend -l +20G /dev/tank/part1 // Add 20G space to part1

Lvresize -l-10g /dev/tank/part2 // Add 10G space to part2

74. Pvdisplay // Displays disk information

75, mplayer-loop 10 / MNT /song/music/ flowers blossom. mp3 // loop 10 times

76, pacman -s Firefox -nd //nd

77, wget -c // breakpoint download

78, chroot/MNT /ubuntu // Change root directory to/MNT /ubuntu

79, CTRL + A // On the command line, move the light label to the beginning

80, CTRL + E // Command line, cursor move end

81, cut -d: -f 1-4 test // Cut -d: -f 1-4 test

82, file /home/zhangy/test.php // Is used to view some basic information about the file

// Create an empty file called text.txt

84, htpasswd – CBD/usr/local/nginx/conf/authfile / / create access control file

85, df // View the disk space and the current number of disks

86, fdisk -l // Check the number of all disks

87, alsamixer // After entering, the M key can be muted

Killall HTTPD // killall HTTPD processes

Killall -9 mysqLD_safe // Some processes cannot be stopped by super users. -9 is forcibly deleted

Mirror /mysql // download mysql directory

91, mirror -r /mysql // upload mysql directory

Rmmod PCSPKR // Turn off the TAB tone

93, modprobe PCSPKR // Enable the TAB prompt tone

94, gpasswd -a zhangy wheel // Add zhangy to wheel group

95, dd if=/dev/zero of=/virtual/ubuntu.virt.img bs=1M count=4096 // Create a 4G IMG image

96, LSPIC // display PCI devices

97, lSUSB // display usb device

98, history | less/more/less root is a bit like, feeling less with more comfortable

99, ln -s // If you forget -s becomes hard link

100, tar ZXVF test.tar.gz -c /home/zhangy/Decompress the content to the specified directory