It will produce passwords with length of 20 printable characters within a reasonable time. For shorter or longer passwords just change the 20 in bs=20 to something more convenient. To create only alpha numeric passwords change [:print:] to [:alnum:] Show Sample Output
This example is taken from Cygwin running on Win7Ent-64. Device names will vary by platform. Both commands resulted in identical files per the output of md5sum, and ran in the same time down to the second (2m45s), less than 100ms apart. I timed the commands with 'time', which added before 'dd' or 'readom' gives execution times after the command completes. See 'man time' for more info...it can be found on any Unix or Linux newer than 1973. Yeah, that means everywhere. readom is supposed to guarantee good reads, and does support flags for bypassing bad blocks where dd will either fail or hang. readom's verbosity gave more interesting output than dd. On Cygwin, my attempt with 'readom' from the first answer actually ended up reading my hard drive. Both attempts got to 5GB before I killed them, seeing as that is past any CD or standard DVD. dd: 'bs=1M' says "read 1MB into RAM from source, then write that 1MB to output. I also tested 10MB, which shaved the time down to 2m42s. 'if=/dev/scd0' selects Cygwin's representation of the first CD-ROM drive. 'of=./filename.iso' simply means "create filename.iso in the current directory." readom: '-v' says "be a little noisy (verbose)." The man page implies more verbosity with more 'v's, e.g. -vvv. dev='D:' in Cygwin explicitly specifies the D-drive. I tried other entries, like '/dev/scd0' and '2,0', but both read from my hard drive instead of the CD-ROM. I imagine my LUN-foo (2,0) was off for my system, but on Cygwin 'D:' sort of "cut to the chase" and did the job. f='./filename.iso' specifies the output file. speed=2 simply sets the speed at which the CD is read. I also tried 4, which ran the exact same 2m45s. retries=8 simply means try reading a block up to 8 times before giving up. This is useful for damaged media (scratches, glue lines, etc.), allowing you to automatically "get everything that can be copied" so you at least have most of the data. Show Sample Output
Command to create a dummy file (full of nulls). Useful for testing e.g. file transfers when no file is at hand. bs = blocksize, count = filesize in kilobytes
If you leave out the block size it defaults to 512 bytes. I set it to 16 Megabytes and it was much faster...
For disk space constraint testing. Leaves a little space available for creating temp files, etc. Easily free up the used disk space again by deleting the dummy00 file. Can tailor the testing by building smaller 'blocks' to suit the needs of the testing. WARNING: do not do this to the '/' (root) filesystem unless you know what you are doing... on some systems it could crash the OS.
This will copy the first 1MB of your /dev/sdX volume to your /root/sdX.bin file, where SDX is the name of the device you wish to copy the data from (Usually a hard disk) NOTE: Make sure you capitalize the M in field for BS. Show Sample Output
Change /dev/sda with the Disk or partition you want to back-up
To restore use:
dd if=~/backup-disk-YY-MM-DD.img of=/dev/sda
Once again change /dev/sda accordingly
Source: http://www.go2linux.org/linux/2010/09/small-tip-back-disks-clone-hard-disk-773
Sends random beeps to your PC-speaker. Think... You can also run it remotely on another computer using SSH and scare its user! Don't forget to run it on your dedicated hosting server and watch sysadmin's action from data-center's live remote cameras!
Sends random sounds to your sound card output (e.g. your speaker). Think... You can also run it remotely on another computer using SSH and scare its user!
Same game as #10096 . loop as many times as you like.
waste the band width Show Sample Output
This is an useful command for when your OS is reporting less free RAM than it actually has. In case terminated processes did not free their variables correctly, the previously allocated RAM might make a bit sluggis over time. This command then creates a huge file made out of zeroes and then removes it, thus freeing the amount of memory occupied by the file in the RAM. In this example, the sequence will free up to 1GB(1M * 1K) of unused RAM. This will not free memory which is genuinely being used by active processes.
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: