• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

znew Command Examples in Linux

by admin

The znew utility uncompresses files compressed by compress and recompresses them with gzip. These files normally have an extension of “.Z”. These files are then re-compressed with an extension of “.gz”. The znew utility tries to maintain the file mode of the original file. If the original file is not writable, it is not able to do that and znew will print a warning.

Syntax of the command:

# znew [-ftv9K] file

znew command examples

1. To compress .Z file to .gz:

# znew test.Z

2. To force compress from .Z to .gz enven if .gz file exists:

# znew -f test.Z

3. To test the new files before deleting originals:

# znew -t test.Z

4. To use the slower compression method:

# znew -9 test.Z

5. To keep the original file if its smaller than .gz file:

# znew -K test.Z

6. To use less disk space while converting:

# znew -p test.Z

Filed Under: Linux

Some more articles you might also be interested in …

  1. “go test” Command Examples
  2. iftop Command Examples in Linux
  3. How to Create a tmpfs Filesystem in CentOS/RHEL
  4. How to Setup SSH keys for “passwordless” SSH Login on CentOS/RHEL
  5. lvconvert Command Examples in Linux
  6. cryptsetup: command not found
  7. gocryptfs Command Examples
  8. gnome-terminal: command not found
  9. aurman Command Examples
  10. How to use sudo to allow a non-root user run a particular command

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright