Brock wrote an article titled 10 Linux commands you have never used (10 Linuxcommandsyou & amp; rsquo; veneverused). although the title is a bit too absolute and subjective, but the article is still good. In fact, whether you have heard of or used it...
Brock wrote an article titled 10 Linux commands you have never used (10 Linux commands you 've never used). although the title is a bit too absolute and subjective, but the article is still good. In fact, whether you have heard or used these commands, it is worth replaying. Isn't it?
The 10 Linux commands are as follows:
Pgrep: for example, you can use pgrep-u root to replace ps-ef | egrep '^ root' | awk' {print $2} 'to capture the root PID.
Pstree: I think this command is cool. it can directly list the process tree, or in other words, list the processes according to the tree structure.
Bc: this command is not found in my system and may need to be installed. This is a command used to execute computation, such as using it to open the square root.
Split: this is a very useful command. it can split a large file into several small parts. For example, split-B 2 m largefile LF _ splits largefile into small files with the LF file name prefix and the size is 2 MB.
Nl: a command that displays the row number. This command should be useful when reading scripts or code. For example, nl wireless. h | head.
Mkfifo: The author said this is his favorite command. This command enables other commands to communicate through a named pipe. Well, it sounds a bit empty. For example, create an MPs queue and write the following content:
Mkfifo ive-been-piped
Ls-al split/* | head> ive-been-piped
Then you can read: head ive-been-piped.
Ldd: outputs the dynamic link library on which the specified file depends. For example, you can use ldd/usr/java/jre1.5.0 _ 11/bin/java to find out which thread libraries are linked to the libraries of java dependencies (dynamic links. (Thank you for your correction .)
Col: saves man manual pages as unformatted text files. For example:
PAGER = cat
Man less | col-B> less.txt
Xmlwf: it can check whether XML documents are good. For example:
Curl-s 'http: // bashcurescancer.com '> bcc.html
Xmlwf bcc.html
Perl-I-pe @
@ G' ">'s @
@
@ G'bcc.html
Xmlwf bcc.html
Bcc.html: 104: 2: mismatched tag
Lsof: list opened files. For example, you can find the opened Port through lsof | grep TCP.
Some of these 10 Linux commands are indeed little known. I personally only use a few of these commands, such as col, split, and lsof. Of course, some of you may have used it all. By introducing this article, we hope we can pay more attention to the use of Linux commands.