bash
The `du` command is used to estimate file and directory space usage. This snippet demonstrates the basic usage of `du` to display disk usage information.
du
bash
The `du` command is used to estimate file and directory space usage. This snippet demonstrates the basic usage of `du` to display disk usage information.
du
bash
Display disk usage in a human-readable format using the `df` command. This shows the amount of disk space used and available on mounted filesystems.
df
bash
Display disk usage information for all mounted filesystems. This command shows the amount of disk space used and available on each filesystem.
df
bash
Extract the contents of a gzip-compressed tar archive (`foo.tar.gz`) using the `tar` command with the `--extract`, `--gzip`, and `--file` options. This demonstrates decompressing and extracting files from a `.tar.gz` archive.
tar
bash
Decompress the file `foo.gz` using `gunzip` while keeping the original compressed file. This demonstrates how to decompress a `.gz` file without removing the original compressed file.
gunzip
bash
Create a compressed archive named `foo.tgz` from the `/bar` directory using `tar` with the `--create` and `--gzip` options. This demonstrates compressing files into a `.tgz` archive.
tar
bash
Create a compressed archive named `foo.tgz` containing the files `/bar.txt` and `/baz.txt` using the `tar` command with `--create` and `--gzip` options. This demonstrates compressing files into a `.tgz` archive.
tar
bash
Compress the file `/bar.txt` into `foo.gz` using `gzip` while keeping the original file intact with the `--keep` option. This demonstrates file compression with `gzip`.
gzip
bash
Create a symbolic link named `bar` pointing to `foo`, forcing the link to be overwritten if it already exists. This demonstrates the use of the `ln` command with the `--symbolic` and `--force` options to manage symbolic links.
ln
bash
Create a symbolic link named `bar` that points to `foo`. This demonstrates creating a symbolic link in a Unix-like system.
ln
bash
Search for lines containing either `foo` or `bar` within the `/baz` directory recursively using `egrep`. This is a pattern to search for multiple strings in files. This demonstrates how to use `egrep` for quick file content searching.
egrep
bash
Search for lines containing either `foo` or `bar` in all files within the `/baz` directory recursively using `grep`. This demonstrates how to search for multiple patterns in files.
grep
bash
Search for the string `foo` in the file `/bar` and highlight the matches with color. This demonstrates using `grep` to find text in a file with colored output.
grep
bash
Search for the string `foo` in the file `/bar` and display the line numbers where matches occur. This demonstrates using `grep` to find specific text within a file and show the corresponding line numbers.
grep
bash
Search for lines in the file `/bar` that do not contain the string `foo` using the `grep` command with the `--invert-match` option. This demonstrates how to find lines that exclude a specific pattern.
grep
bash
Search for the string `foo` in the file `/bar` and display one line of context around each match. This demonstrates using `grep` with the `--context` option to show surrounding lines for better context in search results.
grep
bash
Search for the exact line containing `foo` in the file `/bar` using `grep` with the `--line-regexp` option. This demonstrates how to find exact matches in a file.
grep
bash
Search for the string `Foo` in the file `/bar` using `grep` with case-insensitive matching. This demonstrates how to find text in a file while ignoring case sensitivity.
grep
bash
Search for files in `/bar` that do not contain the string `foo` using `grep` with the `--files-without-match` option. This demonstrates finding files without a specific pattern.
grep
bash
Search for the string `foo` in the directory `/bar` and list the files that contain matches. This demonstrates using `grep` to find files containing a specific pattern.
grep