zforce
Quick Reference
Command Name:
zforce
Category:
file management
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
Syntax
zforce [file...]
Options
The zforce command is quite simple and doesn't have many options:
| Option | Description |
|---|---|
--help |
Display help information |
--version |
Display version information |
How zforce Works
The command operates as follows:
- It examines each file specified as an argument
- If the file is gzip compressed (by reading the file header)
- And doesn't already have a .gz extension
- Then it renames the file, adding the .gz extension
Note: zforce only examines and potentially renames the files specified on the command line. It doesn't recursively process directories unless used with other commands like find.
Examples
How to Use These Examples
The examples below show common ways to use the zforce command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
zforce file1 file2 file3
zforce *
Advanced Examples:
find . -type f -not -name "*.gz" | xargs zforce
for file in *; do file "$file" | grep -q "gzip compressed" && echo "$file is compressed"; done
zforce datafiles/*
find . -type f -exec zforce {} \;