me
requires su privileges Show Sample Output
Usual 200 dpi in density is a good value, but you can decrease this value until 75 dpi for try reduce more the size of pdf. The quality params you must test, because its depends of pdf pages quality.
Shows available disk space on sda1 animated with colors Show Sample Output
Alternatively, the kernel provides a script to cleanly compare two config files even if the options have moved in the file itself: /usr/src/linux/scripts/diffconfig .config.old .config
Check your local temperature based on geolocation. Show Sample Output
Sometimes, it is annoying to find your files or directories missing. If you want to log all the rm commands you can put this in /etc/profile.
Assumes that the files are named in numerical order (ie. 01 Filename.mp3). It will set the track number as tracknumber/totaltracks (ie. 1/14). This will write both ID3v1 and ID3v2 tags. Note: This only writes the track numbers.
Save as a bash script and run as root to set the ondemand cpu frequency governor for all cpu cores. Name the file ondemand. Change 'ondemand' in the argument to performance or your preferred governor to do the same thing but set all cpu cores to use the performance governor (or your preferred governor)
for those without the tree command. Show Sample Output
This command sets the volume for the main PulseAudio "sink" (usually the ALSA output interface) to the maximum, 100% (the 0x10000 in the command). To set it to an arbitrary volume, replace 10000 with the volume you want times 100 (so 75% becomes 7500).
for file in `ls -t \`find . -name "*.zip" -type f\``; do found=`unzip -c "$file" | grep --color=always "PATTERN"`; if [[ $found ]]; then echo -e "${file}\n${found}\n"; fi done
This encodes it in ogg format. Does on-the-fly encoding of the incoming stream. Great for radio streams as they're often flv format.
This will add a perl POD stub above each method in all modules found recursively in your current directory. The stub will look like: =head2 method_name =cut sub method_name { ...
You have a clue... 5 Down: You're looking at it (8) You have some letters... C--SS-O-- You use the terminal... Show Sample Output
Runs the last command as root. This works in bash too. Kind of bulky, but makes a great alias.
When decompressing big files it can be nice to know how long you have to go grab coffee. Show Sample Output
These part of the command: svn status | grep '^\?' => find new file or directory on working copy sed -e 's/^\?//g' => remove "^" character on the first character of file name xargs svn add => add file to subversion repository You can modify above command to other circumtances, like revert addition files or commit files that have been modified. ^_^
Alternately for those without getent or only want to work on local users it's even easier:
cut -d: -f1 /etc/passwd|xargs -n1 passwd -e
Note that not all implementations of passwd support -e. On RH it would be passwd -x0 (?) and on Solaris it would be passwd -f.
In some case, you need to use remote gui on servers or simple machines and it's boring to see "cannot open display on ..." if you forgot to export your display. Juste add this line in .bashrc on remote machine. Dont forget to allow remote client on your local X server :
xhost +
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: