I have this script which runs pretty well bar a couple of problems, I am trying to emulate the rm command and this means I can't use rm directory, I inted to alias my script to rm and then use mv to move files to a trash folder rather than delete forever.
The problem: when I use mv to move a directory into my deleted folder where this directory all ready exists I get an error, I plan to shred all the files and then I want to use rmdir to remove all the empty directories in the tree.
My script is here
I have highlighted the problem function in bold, I want to shred files recrusively and then use rmdir the same way for the empty directories.
Someone recommended this command:
which shreds recursivley but how do I specify which point to start shreding from? when I used this before it wiped out every file in my home directory onwards.
Once I have that sorted I want to use a similar command but replacing rmdir with shred, can anyone advise me away to it?
Also, I am kind of new to Unix could you explain this command a little better, someone else recommended it and I dont really understand the -exec and '{}' \
I ran it in my script and it says missing argument for -exec
do not forget <space>:
find $TRASH/$1 -type f -exec shred -u '{}'<space>\;
This means search (recursive) in directory $TRASH/$1 for files (-type f) and execute for each file which was found command shred -u '{}' where macro {} will be replaced with the file name
Another topic that bothers me on bsd is the missing of bleach-bit. Looking at what bleach-bit can clean, the new version, it wipes out all the caches of the user. May someone can give me a hint how to clean the userland in bsd and all the hidden caches for the user. shred all rubbish or LSA cookies... (0 Replies)
When vfat format my128kb flash drive, shred works fine. But, when I format it using ext2 or ext3, shred() exits with this error:
shred: /dev/sdb1: pass 1/1 (random)...
shred: /dev/sdb1: error writing at offset 12288: Invalid argumentAnyone know what is going on? (0 Replies)
I've created a wxpython gui for the shred command. I can successfully mix and match all the shred options except two: -size and --random-source. (Man page definitions below). -size and --random-source seem to only work when they are used as the sole option passed.
For example,
I can zero a... (0 Replies)
Hi experts.
We have a HP-Unix server, we deleted some files and folders from the server. Is there any utilities that we can use to ensure those deleted files and folders are not recoverable? We used rm command to delete these files.
Cheers,
RT:confused: (1 Reply)
Good afternoon everyone,
For security reasons, I need to delete files on a HDD I have to send after the ending of a demo.
I need to find all the files which not end by ".log" and which have been created for 45 days.
After getting the file list, I would like to use the shred command.
It... (2 Replies)