A better alternative to basic command line tools

Source: Internet
Author: User

A better alternative to basic command line tools

The command line may sound scary sometimes, especially when you are new to it, you may even have a nightmare about the command line. Gradually, however, we will realize that the command line is not so scary, but very useful. In fact, no command line is exactly what makes me feel crashed every time I use Windows. This is because the command line tool is actually intelligent. The basic tools you use on any Linux terminal are powerful, but they are far from powerful enough. If you want to make your command line career more enjoyable, here are a few programs you can download to replace the original default program, it can also provide you with more features than the original program.

Dfc

As an LVM user, I like to view the usage of my hard disk storage at any time. I have never really understood why we have to open the resource manager on Windows to view basic computer information. On Linux, we can use the following command:

  1. $ Df-h

This command displays the size, used space, available space, used space percentage, and mount point of each volume on the computer. Note that you must use the "-h" option to display all data in readable form (using GiB instead of KiB ). However, you can use dfc to completely replace df. Without any additional options, you can get the content displayed by the df command and draw a color usage Diagram for each device, therefore, it is more readable.

In addition, you can use the "-q" option to sort each volume, and use the "-u" option to specify the unit you want to use, you can even use the "-e" option to obtain output in csv or html format.

Dog

Dog is better than cat, at least this program claims so. You should trust it once. All cat commands can do better. In addition to displaying some text streams on the console, dog can also filter them. For example, you can use the following syntax to obtain all images on the webpage:

  1. $ Dog -- images [URL]

Or all links:

  1. Dog -- links [URL]

In addition, the dog command can also process some other small tasks, such as converting all to uppercase or lowercase, using different encodings, displaying the row number and processing hexadecimal files. In short, dog is an essential alternative to cat.

Advcp

The most basic command in Linux is the copy command: cp. It has almost the same status as the cd command. However, it has very few outputs. You can use the verbose mode to view the files being copied in real time. However, if a file is very large, you can wait on the screen without knowing what the background is doing. A simple solution is to add a progress bar: This is what advcp (short for advanced cp) does! Advcp is a patch version of GNU coreutils. It provides acp and amv commands, that is, "advanced" cp and mv commands. The syntax is as follows:

  1. $ Acp-g [file] [copy]

It copies the file to another location and displays a progress bar.

I also recommend that you set the following command alias in. bashrc or. zshrc:

  1. Alias cp = "acp-g"
  2. Alias mv = "amv-g"

(Note: The link provided in the original article seems to be invalid. I wrote an available installation script on my gist and used the patch in AUR .)

The Silver Searcher

The silver searcher name sounds unusual (silver search...), a tool designed to replace grep and ack. The silver searcher searches for The part you want in The file. It is faster than ack and can ignore some files, unlike grep. (Note: In the original article, it seems that grep cannot ignore some files, but grep has similar options.) the silver searcher has some other functions, such as color output and follows soft connections, use a regular expression or even ignore some patterns.

On the developer homepage, the author provides statistics on the search speed. If they are true, they are very impressive. In addition, you can integrate it into Vim and call it with a simple command. If you want to use two words to summarize it, It is intelligent and fast.

Grep uses concise and Regular Expressions

Shell programming in Linux -- basic use of the grep command

Grep command details and related examples

Linux basic commands-grep

Set grep to highlight matching items

Plowshare

Fans of all command lines prefer to use wget or other alternatives to download things from the Internet. But if you use many file sharing websites, such as mediafire or rapidshare. You will be happy to know a program specifically designed for these websites, called plowshare. After the installation is successful, you can use the following command to download the file:

  1. $ Plowdown [URL]

Or upload a file:

  1. $ Plowup [website name] [file]

The premise is that you have an account for file sharing.

Finally, you can get links to a series of files in the Shared Folder:

  1. $ Plowlist [URL]

Or file name, size, and hash value:

  1. $ Plowprobe [URL]

For those familiar with these services, plowshare is a good alternative to the slow and intolerable jDownloader.

Htop

If you use the top command frequently, you may like the htop command. Both the top and htop commands provide real-time viewing for running processes, but htop also has a series of user-friendly features not available for top commands. For example, in htop, you can scroll the process list horizontally or vertically to view the complete command name of each process, you can also use mouse clicks and arrow keys to perform basic process operations (such as kill and (re) nice) without entering process identifiers.

Use the most powerful process monitor htop in Ubuntu

Install htop process management and monitoring tools in CentOS 6.5

Why does Linux's htop command win the top command?

Htop details: click here
Htop: click here

Mtr

A basic network diagnostic tool of the system administrator, traceroute, can be used to display the layer-3 Protocol route from the local network to the target network. Mtr (abbreviated as "My Traceroute") inherits the powerful traceroute function and integrates the ping function. When a complete route is found, mtr displays ping latency statistics for all relay nodes, which is useful for locating network latency. Although there are other traceroute variants (such as tcptraceroute or traceroute-nanog), I believe that mtr is the most practical Enhancement Tool in traceroute.

In general, these very effective Replacement Tools for basic command lines are just like those useful little pearls, they are not so easy to find, but once you find one, you will be surprised how long you have endured it! If you know other tools that match the above description, please share them with us in the comments.

This article permanently updates the link address:

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.