![]() Typing two exclamation points repeats your previous command. The history command lists the commands you have previously issued on the command line. You can repeat any of the commands from your history by typing an exclamation point ! and the number of the command from the history list. We then repeat the command asking for only five lines. In this example, we use head with its default of 10 lines. If you want to see fewer or more lines, use the -n (number) option. The head command gives you a listing of the first 10 lines of a file. To retain both the original and the compressed version, use the -k (keep) option. By default, it removes the original file and leaves you with the compressed version. The groups command tells you which groups a user is a member of. The command below will print the words “A string of text” on the terminal window. The echo command prints (echoes) a string of text to the terminal window. RELATED: How to Compare Two Text Files in the Linux Terminal 9. diff -y -W 70 alpha1.txt alpha2.txt -suppress-common-lines The -suppress-common-lines prevents diff from listing the matching lines, letting you focus on the lines which have differences. The two files are called alpha1.txt and alpha2.txt in this example. The -w (width) option lets you specify the maximum line width to use to avoid wraparound lines. The -y (side by side) option shows the line differences side by side. There are many options to tailor the display to your requirements. The diff command compares two text files and shows the differences between them. RELATED: How to View Free Disk Space and Disk Usage From the Linux Terminal 8. For example, the squashfs pseudo-filesystems that are created when you install an application with the snap command. The exclude option allows you to tell df to discount filesystems you are not interested in. The human-readable option displays the sizes in Mb or Gb instead of in bytes. Two of the most useful options are the -h (human readable) and -x (exclude) options. ![]() The df command shows the size, used space, and available space on the mounted filesystems of your computer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |