|
|
This directory of Linux commands is from Linux in a Nutshell, 5th Edition. Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf. Buy it now, or read it online on Safari Bookshelf. cutcut options [files] Cut out selected columns or fields from one or more files. In the following options, list is a sequence of integers. Use a comma between separate values, and a hyphen to specify a range (e.g., 1-10,15,20 or 50-). See also paste and join. Options
ExamplesExtract usernames and real names from /etc/passwd: cut -d: -f1,5 /etc/passwd Find out who is logged on, but list only login names: who | cut -d" " -f1 Cut characters in the fourth column of file, and paste them back as the first column in the same file: cut -c4 file | paste - file |
|
|
|
|
|
Sponsored by: |