8 Practical LinuxShell commands

Source: Internet
Author: User
1 Create pdf man-tmanpage for man manual | ps2pdf-filename.pdf for example man manual for making ls command pdf man-tls | ps2pdf-ls.pdf2 for command bind shortcut key bind-x & amp; #39; & quot; \ C-l & quot;: ls -...

1. create a pdf version for the man manual
Man-t manpage | ps2pdf-filename.pdf
For example, the man manual pdf file for making ls commands

Man-t ls | ps2pdf-ls.pdf
2. bind the shortcut key to the command

Bind-X' "\ C-l": ls-L'
In this way, press CTRL + L to list the directories. you can add this command ~ /. Bashrc.

3. one-click Start of tmux on the remote host

Tmux is a substitute for GNU Screen and a tool that can enable multiple windows in a terminal. it can be said that it is a very useful remote service maintenance tool, run the following command to directly enable tmux on the remote server.

Ssh-t username@server.com tmux
If you have enabled tmux on the remote host, run the following command.

Ssh-t username@server.com tmux att
In addition, you can bind the shortcut key with the second command, so that you can quickly log on and enable tmux with one click.

4. run the file command to view the device information.

File-s/dev/sd *
5. use the md5 value to compare whether the two files are consistent

Cmp file1 file2
If they are consistent, no prompt will appear. Otherwise, a prompt will be displayed.

6. run one command to make CD/DVD an ISO file.

Dd if =/dev/cdrom of = file. iso
7. copy the entire hard disk to a remote directory through ssh (with compression)

Dd if =/dev/sda | gzip-c | ssh user @ ip 'DD of =/mnt/backups/sda. DD'
8. test the network speed without wasting disks

Dd if =/dev/zero bs = 4096 count = 1048576 | ssh user @ ip 'cat>/dev/Null'
The above Command sends 4 GB data to the remote host through ssh, but does not occupy any disk space.

Author "Sparehot"

Related Article

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.