bash
Decompress the file `foo.gz` using the `gunzip` command. This demonstrates how to extract a `.gz` compressed file.
gunzip
bash
Decompress the file `foo.gz` using the `gunzip` command. This demonstrates how to extract a `.gz` compressed file.
gunzip
bash
Unzip the contents of `foo.zip` into the current directory using the `unzip` command. This demonstrates decompressing files from a ZIP archive.
unzip
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 multiple files into a single `.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
Compress the file `/bar.txt` into a gzip archive named `foo.gz`. This demonstrates using the `gzip` command to compress files.
gzip
bash
Compress the contents of the `/bar` directory into a ZIP archive named `foo.zip` using the `zip` command with the `--recurse-paths` option to include all subdirectories and files. This demonstrates compressing files and directories into a ZIP archive.
zip
bash
This code compresses the files `bar.txt` and `baz.txt` into a single ZIP archive named `foo.zip`. It demonstrates the use of brace expansion to specify multiple files for compression with the `zip` command.
zip
bash
Compress the files `/bar.txt` and `/baz.txt` into a single archive named `foo.zip` using the `zip` command. This demonstrates file compression.
zip
bash
Compress the file `/bar.txt` into a ZIP archive named `foo.zip`. This demonstrates using the `zip` command to create a compressed archive of a file.
zip
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
Replace all occurrences of the word `fox` with `bear` in the file `foo.txt` using `sed`. The `--in-place` option modifies the file directly. This demonstrates how to perform in-place text replacement in a file.
sed
bash
Replace all occurrences of the word `fox` with `bear` in the file `foo.txt` and save the result to `bar.txt`. This demonstrates using `sed` for find-and-replace operations in text files.
sed
bash
This snippet uses `sed` to replace all occurrences of "red fox" with "blue bear" in the file `foo.txt`. It demonstrates how to perform a global search and replace operation within a file using the `sed` command.
sed
bash
Replace all occurrences of "fox" with "bear" in the file `foo.txt`, ignoring case sensitivity. This demonstrates using `sed` for in-file text replacement.
sed
bash
This code uses `sed` to replace all occurrences of the word "fox" with "bear" in the file `foo.txt`. This demonstrates how to perform a global search and replace operation in a file using `sed`.
sed
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 the file `/baz` using extended regular expressions. The `-R` option is incorrectly used here as it is intended for recursive directory searches, not single files. This demonstrates basic pattern matching with `grep`.
grep