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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. How to Reserve a Port Range for a Third Party Application in CentOS/RHEL
  2. scrot Command Examples in Linux
  3. lvchange Command Examples in Linux
  4. How to effectively use Man Pages under Linux
  5. Examples of using dmsetup command in Linux
  6. Understanding MySQL Privileges
  7. “polkit code=exited status=1/FAILURE” – PolicyKit Failing to Start in CentOS/RHEL 7 and 8
  8. How to Check Swap Usage Live via the ‘top’ Command in Linux
  9. apt: command not found
  10. rpcinfo: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright