• 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

shred: command not found

by admin

Before encrypting a device, it’s a good idea to overwrite its contents with random data or all zeros. This ensures that no sensitive data from past use remains on the device. The shred command can be used to securely wipe a storage device in this manner.

If you encounter the below error while running the nohup command:

shred: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
OS X brew install coreutils
Debian apt-get install coreutils
Ubuntu apt-get install coreutils
Alpine apk add coreutils
Arch Linux pacman -S coreutils
Kali Linux apt-get install coreutils
CentOS yum install coreutils
Fedora dnf install coreutils
Raspbian apt-get install coreutils

shred Command Examples

1. Overwrite a file:

# shred file

2. Overwrite a file, leaving zeroes instead of random data:

# shred --zero file

3. Overwrite a file 25 times:

# shred -n25 file

4. Overwrite a file and remove it:

# shred --remove file

Conclusion

Digital shredding in Linux is done with the shred command. Its usage is very similar to the rm command, though in terms of removal, shred is much more thorough. The shred command overwrites the file 25 times (which is adjustable by using the -n # option) so it is impossible to re-create it. Before using shred, however, read its man page, as its success rate is highly dependent on the type of filesystem you’re using.

Filed Under: Linux

Some more articles you might also be interested in …

  1. iconv Command Examples
  2. “hg commit” Command Examples
  3. dhcpwn: Test DHCP IP exhaustion attacks and sniff local DHCP traffic
  4. flatpak Command Examples in Linux
  5. clang-tidy: An LLVM-based C/C++ linter to find style violations, bugs and security flaws through static analysis
  6. “aws s3 ls” Command Examples
  7. e2image: command not found
  8. xfs_admin: command not found
  9. flameshot: command not found
  10. flips: Create and apply patches for IPS and BPS files

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