Find the answer to your Linux question:
Results 1 to 3 of 3
Newb needs to shred multiple files. Have been using: shred -vuxfn 5 <filename> and it works great but only one file at a time. Info shred indicates shred is for ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Texas, USA
    Posts
    107

    script to shred multiple files?


    Newb needs to shred multiple files. Have been using:
    shred -vuxfn 5 <filename>
    and it works great but only one file at a time. Info shred indicates shred is for devices but this is just a folder. I thought about creating a new /dev/hda8 then transfer files to this partition, but.....
    I don't want to shred the device or disk, just about 40 or 50 non critical financial files before i sell my PC.
    New to scripting. Any help out there?
    Thanks

  2. #2
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    I don't know shred (and I don't know what it means), however if you make a list of files you want to "shred" in a file called /home/user/shred.txt, then to shred them, try this command:
    Code:
    cat /home/user/shred.txt|xargs shred -vuxfn 5

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    95
    try this out. it works for me
    shred -n 200 -z -u /<directory name>/*.*

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •