Some little-known but interesting Unix/Linux commands

Source: Internet
Author: User
Tags print format printable characters processing text

Original post link: http://www.diguage.com/archives/8.html

 

  • XargsOrParallelRead the information from the standard input as a parameter, initialize the executable command, and then run the command once or multiple times. It can be executed in parallel.
  • SedAndAwkThese two commands are well-known and can be said to be the omnipotent machine for processing text files, and the speed is faster than Ruby or Python.
  • M4A simple macro processor is mainly used as a ratfor front-end when no parameter macros are powerful enough;
  • ScreenPowerful terminal multiplexing and session persistence tools. (For more information, see what d guago doesn't understand. Haha)
  • Yes, Repeat the parameter string until the command is forcibly "killed". If no parameter exists, print y;
  • CalThe layout is a good calendar;
  • EnvTo display the environment variables of the current user;
  • LookTo find the English words starting with the parameter string;
  • Cut, Used to split the strings in the file and display them as required;
  • PasteTo connect the corresponding lines of several files with tabs and output them to the standard output;
  • JoinMerge the data rows of the two files based on the public fields (keywords). For details, refer to the articles in "references;
  • FMTRead the content from the specified file, reorchestrate it according to the specified format, and output it to the standard output device;
  • PRTo quickly orchestrate a series of texts into a suitable print format. A basic purpose is to split a large file into multiple pages and add titles for each page. PR is a standard output tool that can be directly output to the printer. If you want to save the result in a file, you need to redirect its output;
  • FoldRead the content from the specified file, add the columns that exceed the specified column width to the column, and output the content to the standard output device;
  • ColumnFormat the text in the form of a table based on the blank space and then output the text.
  • Expand, Convert the tab in the file to space, and display the result to the standard output device;
  • Unexpand, Opposite to expand, convert the space in the file to a tab and display the result to the standard output device;
  • NL, Displays the file content, and adds a row number before each line;
  • SeqTo display the sequence of numbers from 1 to the specified number. If the parameter is negative, it is not displayed;
  • BC, A simple calculator;
    • Factor,Splits a number into the product of multiple numbers;
    • NC,Powerful Network Tools for network debugging or data transmission;
    • DD,Use a block of the specified size to copy an object and perform the specified conversion at the same time;
    • File,Identifies the file type;
    • Stat,Query and display file information, such as modification time and size;
    • Tac,Reverse output file content;
    • Shuf,Output input rows (or files) to standard output in random order;
    • Comm,Compare two sorted files by row;
    • Hexdump (which can be abbreviated as HD ),It is generally used to view the hexadecimal encoding of a "binary" file;
    • BVI,Binary file editor;
    • Strings,Display printable characters in the file;
    • Tr,You can quickly implement simple character conversion. You can also delete the specified sub-string in the string and merge repeated strings in the string;
    • Iconv,Converts a specified file from one encoding to another.
    • Split,You can cut a file into smaller ones. Each 1000 rows can be cut into a smaller one by default;
    • Csplit,After the files are cut according to the specified template style, they are saved as xx00, xx01, xx02... File;
    • 7z,High-Rate File compression;
    • LDD,A tool used to analyze the dynamic library required for running the program;
    • Nm,A tool used to view the contents of the symbol table in a specified program;
    • AB,Web performance benchmark testing tools;
    • Strace,Trace system calls and received signals during process execution;
    • MTR,A very useful tool for determining network connectivity;
    • Cssh,Cluster SSH is a tool that can operate on multiple windows simultaneously;
    • Wireshark,A powerful network packet capture tool that provides users with various information about networks and upper-layer protocols. It is the most popular network analysis tool in the world;
    • Tshark,The command line tool corresponding to Wireshark;
    • Host,The DNS resolution query tool resolves a host name to an IP address or an IP address to a host name;
    • Dig,The DNS resolution query tool is more explicit than the host command, but not easy to understand;
    • Lsof,Is short for list open files. It is a tool used to list open files in the current system;
    • Dstat,Collect the running data of the system and collect the specified performance resources;
    • Iostat,A query tool for CPU and hard disk I/O usage status;
    • Htop,TOP Command upgrade, interactive command line process monitor;
    • Last,Query System Login logs;
    • W,Displays the user information currently logged on to the system, which is more powerful than who;
    • ID,Query user IDs and group IDs;
    • SAR,It is mainly responsible for collecting, reporting and storing system operation information;
    • Iftop,Similar to top real-time traffic monitoring tools;
    • SS,Command Used to view socket information, an upgraded version of netstat;
    • Dmesg,A tool used to display the control information of the kernel buffer system;
    • Hdparm,Used to detect, display, and set parameters of the IDE or SCSI hard disk;
    • Lsb_release,Used to view the release information of the current system;
    • Lshw,That is, list hardware, a tool for viewing hardware information;
    1. Fortune,Every time you run this command, an interesting sentence or an interesting Q & A will be given. You can learn English, enjoy and entertain yourself! Haha
    2. SL,This command is very interesting. You can get a steam locomotive directly. Who can play!
    3. Sudo !!,Execute the last command as the root user. This is very useful! Strongly recommended...
    4. Cat </dev/tcp/domain-or-IP/port-here,You can create a one-time TCP socket link;
    5. Tree,Present the current directory and all sub-directories in the form of a tree
    6. PV,That is, pipe viewer. view the execution of commands that have been running for a long time.
    7. Ncdu,That is, ncurses disk usage, recursively displaying the disk space occupied by each file (or folder;
    8. Fdupes,Find and delete duplicate files;
    9. Find,It is used to search for files and provides many unexpected functions;
    10. Sdiff,Merge the differences between files in a side-by-side manner;
    11. Base64,The data (text, binary files, etc.) is interpreted as strings in base64 encoding and then output;
    12. Nice,Run the command with a specified priority. If no priority is specified, the program displays the current priority;
    13. Uname,Output a set of system information. If no parameter is added, only the kernel name is displayed;
    14. Setfacl,Sets the File Access Control List;
    15. Tee,Redirects standard input to a file or standard output;
    16. MC,Midnight Commander (MC) is a "Swiss Army Knife" in the Linux console and other terminal environments. It is a very convenient File Manager, which is equivalent to the total commander in windows.
    17. Beep or "echo-e '\ a'>/dev/console ",A computer sends a beep to warn a computer user. For example, a command is not completed.
    18. Mesg,Control whether other messages can be sent to your terminal interface
    19. Write,Send messages to other users on the computer (ending with Ctrl + D)
    20. Wall,Send a message to all users of the computer;
    1. Finger,Query user information, which usually displays the user name, main directory, stagnation time, Logon Time, logon shell, and other information of a user in the system;
    2. !!,Repeat the previous command. In addition,!PatternYou can quickly execute commands starting with patttern in commands that have been executed, which is quite convenient and convenient;
    3. At,Regular scheduling: You can run a job at a certain interval. You only need to run the job once instead of periodically running it. Use the AT command;
    4. WC,Query the number of rows or words in the file;
    5. Taskset,Limit the number of CPUs occupied by processes;
    6. Tail,The command is used to display the last few lines of the file. The default value is 10. It is generally used to view log files. The latest file content is continuously output based on log updates. You do not need to refresh and view the content. CTRL + C can end the output;
    7. Apropos,In Linux, there are powerful help commands other than man. What the Command actually completes is to search the descriptions of other commands and list the relevant commands. Not necessarily, the command is what you want, however, it can help recall useful commands;
    8. Nload,Tools used to view network traffic of Linux servers in real time;: I really like nload and iftop to monitor network activity when tcpdump low-levelness is not needed.
    9. Find-delete,Find and delete the files that meet the filtering conditions;
    10. Watch,Watch can help you monitor the running results of a command, saving you the need to manually run it over and over again;
    11. Xxd,Displays an object in hexadecimal format;
    12. CTRL + R,Commands executed by reverse search are very powerful! With this, you can discard history;
    13. Dmidecode,Dump the DMI (Desktop Management Interface) information of the machine in a readable way. The information includes hardware and bios, which can be used to obtain the current configuration, you can also get the maximum configuration supported by the system;
    14. Most,Like the more and less functions, the text viewer;
    15. Iptraf,Monitors network traffic, especially when installed on the firewall, and works with iptables to monitor network exceptions that flow through the firewall;
    16. Open,You can use an associated program to open a file based on the file extension;
    17. Cowsay,This command can make a cowboy say two humorous sentences. (In view of the comments in the previous article, this command may already be in the ranks of the game. Please note .)
    18. Rsync,The software that implements the remote synchronization function, while Synchronizing files, it can maintain additional information such as the permissions, time, and soft and hard links of the original file;
    19. Pgrep,A tool that queries a process by program name. It is generally used to determine whether the program is running;
    20. YACC,The compiler used to generate the compiler (the compiler code generator );
    21. Du,Measure the disk space occupied by directories (or files;
    22. Ssh,Used to remotely log on to a Linux host;

     

     

  • 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.