~$ python --version
Python 2.7.18
~$ python -m pip --version
pip 20.2.3 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py --user
#!/bin/bash
for file in $@
do
Inode=$(stat $file | grep -- 'Inode:' | sed -e's/.*Inode: \([0-9]*\).*/\1/')
Links=$(stat $file | grep -- 'Links:' | sed -e's/.*Links: \([0-9]*\).*/\1/')
if test $Links -ge 2
then
find -inum $Inode | xargs shred -u -n 30 -z
else
stat $file | grep -- 'File:' | sed -e's/[^‘]*‘\([^ ]*\)’[^‘]*/\1 /g' | xargs shred -u -n 30 -z
fi
done