All Entries Tagged With: "file"
Download and unzip a file to multiple directories.
From Nukeit.org
This script was written because some plugins used on more than one blog get updated every day, yet don’t have a public source control. To use, create a file called dirfile.txt in the same directory as you save the script. Add the full paths to each of your target directories, and save. Run the script and paste in the url to the zip you want to download and extract. That’s it!
Download & unzip a file to multiple directories. (107)Securely Destroy Data
From: http://www.commandlinefu.com
$ shred targetfile
GNU shred is provided by the core utils package on most Linux distribution (meaning, you probably have it installed already), and is capable of wiping a device to DoD standards.
You can give shred any file to destroy, be it your shell history or a block device file (/dev/hdX, for IDE hard drive X, for example). Shred will overwrite the target 25 times by default, but 3 is enough to prevent most recovery, and 7 passes is enough for the US Department of Defense. Use the -n flag to specify the number of passes, and man shred for even more secure erasing fun.
Note that shredding your shell history may not be terribly effective on devices with journaling filesystems, RAID copies or snapshot copies, but if you’re wiping a single disk, none of that is a concern. Obviously shredding a disk would take quite some time.
Download a specific file from the web
From: http://www.commandlinefu.com
To download a specific file from the web:
curl -f -O http://pcbsd.fastbull.org/7.0.2/i386/PCBSD7.0.2-x86-DVD.iso
or, if you have wget configured:
wget -c http://pcbsd.fastbull.org/7.0.2/i386/PCBSD7.0.2-x86-DVD.iso
-C option will re download from an existing & interrupted download.





