Contents
What does the-a option in the du command do?
The -a (i.e., all) option tells du to report not just the total disk usage for each directory at every level in a directory tree but also to report the space consumption for each individual file anywhere within the tree.
What are the commands for filtering a file?
The sed man page has added control options and instructions: 3. Grep, Egrep, Fgrep, Rgrep Commands These filters output lines matching a given pattern. They read lines from a file or standard input, and print all matching lines by default to standard output.
What’s the difference between DF and Du in Linux?
Among them is the df command, which is likewise used by system administrators to monitor disk usage. However, unlike du, it can only show the space consumption on entire partitions, and it lacks du’s fine-grained ability to track the space usage of individual directories and files.
How to filter text in a Linux file?
12 Useful Commands For Filtering Text for Effective File Operations in Linux. 1 1. Awk Command. Awk is a remarkable pattern scanning and processing language, it can be used to build useful filters in Linux. You can start using it 2 2. Sed Command. 3 3. Grep, Egrep, Fgrep, Rgrep Commands. 4 4. head Command. 5 5. tail Command.
What does the last line of the du report do?
A final line at the end of the report gives the total space consumption for the directory tree. du can provide information about any directory trees or files on the system whose names are given as arguments.
Where can I find the size of a du file?
Likewise, the following will report the sizes of the two files named file1 and file2 that are located in the /sbin directory (which contains executable programs): du can accept any number of arguments, and they can be any combination of files and directories.
When to use a trailing slash in Linux?
Most commands I use in linux behave exactly the same whether I include the trailing slash / character on the end of a directory name or not. When does this trailing slash matter? What is the semantic meaning of the trailing slash?