Continue with the 11 little-known practical Linux commands in the previous article. in this article, we will focus on several other unknown Linux commands, some of which have proved very useful in managing desktops and servers. 12. Space Command every command you type on the terminal will be recorded to his Linux command
Continue with the 11 little-known practical Linux commands in the previous article. in this article, we will focus on several other unknown Linux commands, some of which have proved very useful in managing desktops and servers.
12. <空格> Command
Every command you typed on the terminal is recordedHistory, Can also be usedHistoryCommand.
How can I cheat the history Command? You can do it easily. On the terminal, you only need to enter one or more spaces before entering the command, so that your command will not be recorded.
Let's try it out. First, try five common Linux commands on the terminal and leave a blank before the command (for example, ** ls, pwd, uname, echo "hi" ** andWho), And then check whether these commands are recorded in history.
avi@localhost:~$ lsavi@localhost:~$ pwdavi@localhost:~$ unameavi@localhost:~$ echo “hi”avi@localhost:~$ who
Run nowhistoryCommand to check whether the preceding commands have been recorded.
avi@localhost:~$ history 40 cd /dev/ 41 ls 42 dd if=/dev/cdrom1 of=/home/avi/Desktop/squeeze.iso 43 ping www.google.com 44 su
As you can see, the commands not executed last are not recorded. We can also use another commandcat | bashCheat history and the result is the same as above.
13. stat command
In LinuxStatCommand to display the status information of a file or file system. When the file name is used as a parameter,StatAll information about the file is displayed. Status information includes filesSize, block, permission, access time, modification time, and status change time.
avi@localhost:~$ stat 34.odt File: `34.odt' Size: 28822 Blocks: 64 IO Block: 4096 regular file Device: 801h/2049d Inode: 5030293 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ avi) Gid: ( 1000/ avi) Access: 2013-10-14 00:17:40.000000000 +0530 Modify: 2013-10-01 15:20:17.000000000 +0530 Change: 2013-10-01 15:20:17.000000000 +0530
14. +. and +.
The preceding key combination is not a command, but a shortcut key that passes the last command parameter to the prompt, and passes the command in reverse order of the input command. Press Alt or Esc and then click ".".
15. pv command
InMovieIn particularHollywood moviesYou may have seen simulated text, such as inputting text in real time. you can usePvCommand output, including assembly line output, is modeled on the text output of any type of simulated wind.PvIt may not be installed on your system. you need to useAptOrYumObtain the installation package, and then installPvTo your machine.
root@localhost:# echo "Tecmint [dot] com is the world's best website for qualitative Linux article" | pv -qL 20
Output style
Tecmint [dot] com is the world''s best website for qualitative Linux article
16. mount | colum-t
The preceding command uses a good format and specification to list all mounted file systems.
avi@localhost:~$ mount | column -t
Output style
/dev/sda1on / type ext3 (rw,errors=remount-ro) tmpfson /lib/init/rw type tmpfs(rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfson /sys type sysfs(rw,noexec,nosuid,nodev) udev on /dev type tmpfs(rw,mode=0755) tmpfson /dev/shm type tmpfs(rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) fusectl on /sys/fs/fuse/connections type fusectl (rw) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) nfsd on /proc/fs/nfsd type nfsd (rw)
17. Ctr + l Command
Before proceeding to the next step, let me first ask, how do you clean up your terminal? You will enter"Clear". Okay. Using the above command to execute the cleanup terminal will all be in the past. You only need to pressCtr + lTo see how it cleans up your terminal immediately.
18. curl Command
InCommand lineHow to check yourUnread emails? This command is intended for persons working on servers without graphic interfaces? Apricot Shard K? Are you jealous of me? What are the possible causes? Too many tasks? Why can't I get rid of the peptide in the neck of the apricot horse? Why? Step on? Too many? /P>
avi@localhost:~$ curl -u avishek1210@gmail.com --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print \t if //; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'
Output style
Enter host password for user 'avishek1210@gmail.com': Gmail - Inbox for avishek1210@gmail.com People offering cars in Delhi - Oct 26 Quikr Alerts another dependency question Chris Bannister Ralf Mardorf Reco Brian François Patte Curt Siard berenger.morel Hi Avishek - Download your Free MBA Brochure Now... Diya ★Top Best Sellers Of The Week, Take Your Pick★ Timesdeal aptitude misconfigure? Glenn English Choosing Debian version or derivative to run Wine when resource poor Chris Bannister Zenaan Harkness Curt Tom H Richard Owlett Ralf Mardorf Rob Owens
19. screen command
ScreenThe command can disconnect a long-running process in a session and connect it again. if necessary, it also provides flexible command options.
To run a long process, we usually execute
avi@localhost:~$ ./long-unix-script.sh
The lack of flexibility requires the user to continue the current session, but if we execute the above command:
avi@localhost:~$ screen ./long-unix-script.sh
It can be disconnected or reconnected in different sessions. When a command is being executed, pressCtrl +"And then press"D"ComeDisconnected.
Reconnect and run:
avi@localhost:~$ screen -r 4980.pts-0.localhost
Annotation: Here, the later part of this command isScreen id, You can use'Screen-ls'Command to view. For more information