• 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

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. lnav: command not found
  2. How to recover from deleted root entry in /etc/shadow and/or /etc/passwd files in CentOS / RHEL 6
  3. KVM Virsh Command Examples on CentOS and RHEL
  4. pvcreate Fails With Error: “Device /dev/mapper/mpatha Not Found (or Ignored By Filtering).”
  5. What are Symbolic Links (Soft Links) and how to create them under Linux
  6. dirb Command Examples in Linux
  7. dd Command Examples in Linux
  8. chage: command not found
  9. How to Audit for Modifications to files and Executions of Files in Linux
  10. Linux OS service ‘auditd’

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright