If you have some drive imaging to do, you can boot into any liveCD and use a commodity machine. The drives will be written in parallel.
To improve efficiency, specify a larger block size in dd:
dd if=/dev/sda bs=64k | tee >(dd of=/dev/sdb bs=64k) | dd of=/dev/sdc bs=64k
To image more drives , insert them as additional arguments to tee:
dd if=/dev/sda | tee >(dd of=/dev/sdb) >(dd of=/dev/sdc) >(dd of=/dev/sdd) | dd of=/dev/sde
For debian likes, that's in python-xml package.
Print out contents of file with line numbers. This version will print a number for every line, and separates the numbering from the line with a tab. Show Sample Output
Parsing the output of ls is never a good idea for any reason. Using find this way: - works with files that have spaces in their names. - actually lists "sub folders" and not of all files and folders. - does not break if there are a huge number of files in the current directory.
This command allow you to set the swappiness var at 50 (default is 60). The value interval must be set between 0 and 100. If swappiness is high=Swap usage is high, if swappiness is low=Ram usage is high.
it provides the ratio used for the RAM and The SWAP under Linux. When swappiness is high, Swap usage is high. When swappiness is low, Ram usage is high. Show Sample Output
Alternative of OJM snippet : This one show the IP too, where ports bind. It's very important, because if there's only 127.0.0.1 instead of 0.0.0.0, connections from internet are rejected.
Another way of sending an attachment. -s : subject file : file to be sent
For fancier and cleaner output, try the following snippet :
showendlines(){ while read i; do od --address-radix=n --width=$(wc -c <<< "$i") -c <<< "$i" | perl -pe 's/.\K\s{2,3}//g'; done < $1 | grep --color '\\.'; }
Now you can run that with :
showendlines <FILE>
Thanks to prince_jammys to "debug" my English ;)
Send it the easy way, with MIME and everything handled for you by an app that knows best.
on this way we can define the body too
There's too many options to number, My curiosity has forced me to make it using only sed. Maybe useful... or not... :-S
Tested on MacOS X
Use if you have pictures all over the place and you want to copy them to a central location Synopsis: Find jpg files translate all file names to lowercase backup existing, don't overwrite, preserve mode ownership and timestamps copy to a central location
The 1440 is the number of bytes, and the A: specifies the floppy drive.
-t option tells the system to look for a msdos filesystem The /dev/fd0 is your floppy drive ( This may be different for you check /dev folder to confirm) /mnt/floppy is the point where you want to mount the device to
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: