[Gutsy]How do I represent a variable that will be a file name in a script?
John Toliver
john.toliver at gmail.com
Tue Dec 25 19:30:23 UTC 2007
1. So as I understand it what I want to do more research on is the term
called "regular expressions"? I googled for "regular expressions" and got
mixed results with something called "extended regular expressions" is this
related? (I can probably figure this part out on my own)
2. For my shred script I did this:
-------------------------------------------------------------------------------------------------------------
#!/bin/bash
shred -f "$1"
rm "$1"
-------------------------------------------------------------------------------------------------------------
This 'appears' to have shredded the file and then deleted it. It's weird
but the first time I tested the script, I thought it was broken because the
file remained on the desktop. I tried to play it and found it was garbage
data so I assumed 'shred' simply overwrites the file and then I added the
second instruction to delete it afterwards.
Now the shred man page says if a setting in your etc/fstab file for the EXT3
is set a certain way then it's possible that the shredded file can be
recovered...
My fstab file looks like this:
-------------------------------------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda2
UUID=05c88919-02ac-4600-8314-60f526db279d / ext3
defaults,errors=remount-ro 0 1
# /dev/sda3
UUID=1326a60b-8ec3-48ef-a8a6-c32c72d7825e /home ext3
defaults 0 2
# /dev/sda1
UUID=28DC714FDC7117F0 /media/sda1 ntfs defaults,umask=007,gid=46
0 1
# /dev/sda4
UUID=bea4e226-c950-4213-9b79-0944af99dcb0 none swap
sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec 0 0
-------------------------------------------------------------------------------------------------------------
So now would I need to edit something here in order to make the file
unrecoverable if I use this script?
Thanks to all for the help. I appreciate it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20071225/6964b66a/attachment.html>
More information about the ubuntu-users
mailing list