Creates a single primary partition starting at sector 0 and extending to the end of the disk. Use with care.
A tweak using Patola's code as a base, this full-width green matrix display has all the frills (and all the printable characters). You don't need the surrounding parens if you don't care about losing globbing capabilities. Z-shell (/bin/zsh) needs neither the parens nor the `set -o noglob` Screen shot (animated): http://desmond.imageshack.us/Himg32/scaled.php?server=32&filename=matrixh.gif&res=landing If it's too slow, try lowering the `sleep 0.05` or even replacing it with `true` (which is faster than `sleep 0`). I squashed it as narrow as I could to conserve space, though somebody could probably squeeze a char or two out. Enjoy!
">>" appends to the file ">" replaces the entire file make sure to use ">>" Show Sample Output
This was done in csh. Show Sample Output
This command takes a few changes to get to the file format, but once you have that, you're good to go. Set your environment variables and then change the text "front" and "back" to whatever you're files start and end with. You'll end up with some easily sort-able files. Show Sample Output
save as shell script and pipe your command output Show Sample Output
This command allows you to revert every modified file one-by-one in a while loop, but also after "echo $file;" you can do any sort of processing you might want to add before the revert happens. Show Sample Output
Create a bash function for easy reference webPassword() { echo $1 $2 | md5sum | awk '{print substr($0,0,10)}' } alias webpwd=webPassword Use like this. webpwd www.commandlinefu.com MyPetNameHere Show Sample Output
added echo "### Crontabs for $user ####"; to make clear whose crontab is listed.
Show the crontabs of all the users. Show Sample Output
This command clones an image three times and creates a 'tile' image that can be used for a repeating pattern wallpaper. Add 'rm $f $of $off' to the end for cleanup (command was too long to submit with it). See this link for an example: http://meathive.deviantart.com/art/Easy-Photography-Hack-314846774
This version combines the best of the other suggestions and adds these features: 1. It scans a /16 subnet 2. It is very fast by running the ping commands in the background, running them in parallel. 3. Does not use the "-W" option as that's not available in older ping versions (I needed this for OS X 10.5)
You can execute this inside an editor to get all the fields inside your buffer and do the magic, really usefull when your tables contain a giant list of fields. Show Sample Output
If there are spaces won't work.
Use if you want to include untrusted literal strings in your grep regexes.
I use it to list all mounts below a directory:
dir=/mnt/gentoo; cat /proc/mounts |awk '{print $2}' |egrep "^$(egrep_escape "$dir")(/|$)"
/mnt/gentoo
/mnt/gentoo/proc
/mnt/gentoo/sys
/mnt/gentoo/dev
/mnt/gentoo/home
Works even if $dir contains dangerous characters (e.g. comes from a commandline argument).
Show Sample Output
usage: alarmclock TIME TIME is a sleep(1) parameter which tells function how long to wait until raise the alarm.
Echoes text horizontally centralized based on screen width
The command will make it easy to determine free IP ranges in a crowded sub-net. Show Sample Output
Now we can capture only a specific window (we have to chose by clicking on it) ffmpeg complains about "Frame size must be a multiple of 2" so we calculate the upper even number with (g)awk trickery. We remove the grep, we are already using (g)awk here ....why losing time with grep !!! ;) Show Sample Output
This is the fastest way to burn a DVD-Video from the command line.
Dependencies:
libav-tools
dvdauthor
growisofs
The first command:
avconv -i input.avi -target pal-dvd dvd.mpg
converts any given video file avconv can handle into MPEG2-PS (6 Mbit/s) with AC3 audio (448 kbit/s). If your distribution is not up to date, just use ffmpeg - the syntax is the same. Hint: If you want to create an NTSC DVD, type ntsc-dvd instead ;-)
The second command:
echo PAL > ~/.config/video_format
sets PAL as your default video format. This is a workaround for an old dvdauthor bug. If you want NTSC, guess what? Type NTSC instead!
The third command:
dvdauthor -o dvd/ -t dvd.mpg
creates .VOB files and adds them to the dvd/ folder. You don't have to create this folder yourself. You can add as many titles as you like, just keep in mind that there's a maximum of 4482 MiB (4.37 GiB) for normal DVDs.
The fourth command:
dvdauthor -o dvd/ -T
finishes the DVD-Video.
Now you can burn your DVD using growisofs:
growisofs -Z /dev/dvd -dvd-video dvd/
Sources:
manpages
http://tuxicity.wordpress.com/2006/12/01/avi-to-dvd-with-ffmpeg-and-dvdauthor/
Using the output of 'ps' to determine CPU usage is misleading, as the CPU column in 'ps' shows CPU usage per process over the entire lifetime of the process. In order to get *current* CPU usage (without scraping a top screen) you need to pull some numbers from /proc/stat. Here, we take two readings, once second apart, determine how much IDLE time was spent across all CPUs, divide by the number of CPUs, and then subtract from 100 to get non-idle time. Show Sample Output
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: