Top Unix Command Line Utilities
31–40 of 65 posts
Re: Top Unix Command Line Utilities
#32Re: Top Unix Command Line Utilities
#33Earlier quoted context omitted.
I think the only "secure" way to erase the contents of a hard drive is to repeatedly overwrite the disk surface with a mix of random/patterened data (like Darik's Boot & Nuke does). Also, for those wondering about the blocking of /dev/random , it will restrict the number of bits you can copy using dd , but this won't be apparent unless you attempt to copy more bits from the entropy pools than there are available for…
Secure erase depends on the technology of the drive and the prowess of your attacker. If you fear the NSA seizing your disks, consider the tradeoffs of explosive disposal. If you fear a technically-savvy reporter going through your trash bin, overwriting your disk three or four times with patterns will be fine. But it's probably faster to take a drill and make a couple of holes. Make sure you hit the platters. If you…
Zeroize the keys. Then you don't need to worry about the disk.
If your data is something that would be a problem if the physical disks were stolen, don't store it on-disk unencrypted.
Re: Top Unix Command Line Utilities
#34A more interesting set of commandline utilities to know - http://www.cyberciti.biz/open-source/best-terminal-applicati...
Another VERY useful tool I didn't see on this list is iperf. From the Debian package description:
Iperf is a modern alternative for measuring TCP and UDP bandwidth performance, allowing the tuning of various parameters and characteristics.
Features:
* Measure bandwidth, packet loss, delay jitter
* Report MSS/MTU size and observed read sizes.
* Support for TCP window size via socket buffers.
* Multi-threaded. Client and server can have multiple simultaneous connections.
* Client can create UDP streams of specified bandwidth.
* Multicast and IPv6 capable.
* Options can be specified with K (kilo-) and M (mega-) suffices.
* Can run for specified time, rather than a set amount of data to transfer.
* Picks the best units for the size of data being reported.
* Server handles multiple connections.
* Print periodic, intermediate bandwidth, jitter, and loss reports at specified intervals.
* Server can be run as a daemon.
* Use representative streams to test out how link layer compression affects your achievable bandwidth.
I use iperf initially when I'm troubleshooting poor file server transfer speeds, for example. There's a pretty Java GUI too if you want that.
Re: Top Unix Command Line Utilities
#35Earlier quoted context omitted.
I think the only "secure" way to erase the contents of a hard drive is to repeatedly overwrite the disk surface with a mix of random/patterened data (like Darik's Boot & Nuke does). Also, for those wondering about the blocking of /dev/random , it will restrict the number of bits you can copy using dd , but this won't be apparent unless you attempt to copy more bits from the entropy pools than there are available for…
Secure erase depends on the technology of the drive and the prowess of your attacker. If you fear the NSA seizing your disks, consider the tradeoffs of explosive disposal. If you fear a technically-savvy reporter going through your trash bin, overwriting your disk three or four times with patterns will be fine. But it's probably faster to take a drill and make a couple of holes. Make sure you hit the platters. If you…
http://computer-forensics.sans.org/blog/2009/01/15/overwriti...
http://www.howtogeek.com/115573/htg-explains-why-you-only-ha...
Re: Top Unix Command Line Utilities
#36"for i in *.mp3" doesn't work with spaces and some other "special" characters in filenames, see here: http://unix.stackexchange.com/questions/9496/looping-through...
Re: Top Unix Command Line Utilities
#37xxd is a pretty nice hexdump substitute that has a reverse mode of operation (-r), turning a hexdump into binary.
Re: Top Unix Command Line Utilities
#38"for i in *.mp3" doesn't work with spaces and some other "special" characters in filenames, see here: http://unix.stackexchange.com/questions/9496/looping-through...
The for loop works fine. Performing word splitting/wildcard expansion/etc on a variable will, well, split it into words/expand wildcards/etc, whether it was introduced by a for loop or not.
for i in *.mp4; do ffmpeg -i "$i" "${i%.mp4}.mp3"; done
will result in executing: ffmpeg -i foo foo.mp3
ffmpeg -i bar.mp4 bar.mp3
Which is obviously not what was meant. So it's a good habit to learn to loop over files in a directory in a different way.Re: Top Unix Command Line Utilities
#39 #!/bin/bash
#~/.scripts/runinbg
#Author: Khaja Minhajuddin
#Script to run a command in background redirecting the
#STDERR and STDOUT to /tmp/runinbg.log in a background task
echo "$(date +%Y-%m-%d:%H:%M:%S): started running $@" >> /tmp/runinbg.log
cmd="$1"
shift
$cmd "$@" 1>> /tmp/runinbg.log 2>&1 &
#comment out the above line and use the line below to get get a notification
#when the test is complete
#($cmd "$@" 1>> /tmp/runinbg.log 2>&1; notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$rawcmd")&>/dev/null &