Skip to content

Instantly share code, notes, and snippets.

@TonyStark
Last active March 8, 2021 20:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TonyStark/e061ab41191d3f0c278b67644151a754 to your computer and use it in GitHub Desktop.
Save TonyStark/e061ab41191d3f0c278b67644151a754 to your computer and use it in GitHub Desktop.
Shred multiple files in linux with drag and drop gui
#!/bin/bash
zenity --title="Shred Files BOX" --text="Drag file to below box" --entry --width=600 | cut -c 8- | tr -d '\r' >> /tmp/shredfiles
IFS=$'\n' read -d '' -r -a filess < /tmp/shredfiles
for ((i=0;i<${#filess[@]};i++))
do
file=`python2 -c 'import sys, urllib; print urllib.unquote(sys.argv[1])' "${filess[$i]}"`
shred -uvz "$file" > /dev/null 2>&1
done
rm /tmp/shredfiles
@TonyStark
Copy link
Author

TonyStark commented Mar 8, 2021

READ ME:
install zenity and python
run bash shredgui.sh
drag single/multiple file in text box and press ok
you can also set keyboard shortcut using "bash /LOCATION/shredgui.sh" command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment