Ten Linux commands that are rarely known-Part 2

Source: Internet
Author: User

Continue to the first Article 11 Linux commands that are rarely known but useful [see]. In this article, we will focus on several other unknown Linux commands, some of them prove useful in managing desktops and servers.

12. <space> the command is recorded in history for each command you typed on the terminal, and can be re-called using the history command.

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 value before the command (for example, ** ls, pwd, uname, echo "hi" ** and who), and then check whether these commands are recorded in history.

Bkjia @ localhost :~ $ Ls
Bkjia @ localhost :~ $ Pwd
Bkjia @ localhost :~ $ Uname
Bkjia @ localhost :~ $ Echo "hi"
Bkjia @ localhost :~ $ Who
Run the history command to check whether the commands executed above have been recorded.

Bkjia @ localhost :~ $ History
40 cd/dev/
41 ls
42 dd if =/dev/cdrom1 of =/home/bkjia/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 command cat | bash to spoof history. The result is the same as above.

13. The stat command in Linux is used to display the status information of a file or file system. When the file name is used as a parameter, stat displays all information about the file. The status information includes the file size, block, permission, access time, modification time, and status change time.

Bkjia @ localhost :~ $ Stat 34.odt
File: '34. odt'
Size: 28822 Blocks: 64 IO Block: 4096 regular file
Device: 801 h/2049d Inode: 5030293 Links: 1
Access: (0644/-rw-r --) Uid: (1000/bkjia) Gid: (1000/bkjia)
Access: 00:17:40. 000000000 + 0530
Modify: 15:20:17. 000000000 + 0530
Change: 15:20:17. 000000000 + 0530

14. <alt> +. and <esc> +. 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 commands in movies, especially Hollywood movies, you may have seen simulated text. For example, if you input text in real time, you can use pv commands to simulate text output of any type of simulated wind, including assembly line output. Pv may not be installed on your system. You need to use apt or yum to obtain the installation package, and then install pv to 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 | the command above colum-t lists all mounted file systems in a good format and specification.

Bkjia @ 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. Before executing the Ctr + l command, let me first ask, how do you clean up your terminal? You will enter "clear" at the prompt ". Okay. Using the above command to execute the cleanup terminal will all be in the past. You only need to press Ctr + l to see how it cleans up your terminal immediately.

For more details, please continue to read the highlights on the next page:

Recommended reading:

Linux Command cd

Cat for Linux commands

Linux Command alias/unalias

Linux Command Parsing: su root and su-root

Interactive input of Linux commands read

File Processing commands for Linux commands

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.