Forward local UDP port to remotetarget via ssh.
helpful when you see something like this: zsh: argument list too long: cp
This command will use grep to read the shortcut (which in the above examle is file.url), and filter out all but the only important line, which contains the website URL, and some extra characters that will need to be removes (for example, URL=http://example.com). The cut command is then used to get rid of the URL= at the beginning. The output is then piped into Firefox, which should interpret the it as a web URL to be opened. Of course, you can replace Firefox with any other broswer. Tested in bash and sh.
This will display the system memory size in kb. If you want to see the value in mb, you can type: grep MemTotal: /proc/meminfo | awk '{printf("MemTotal: %d MB\n",$2/1024)}' Show Sample Output
Works with any file name: space, ', " and even \n is OK. The code in {= =} is a perl expression.
To allow recursivity :
find -type f -exec md5sum '{}' ';' | sort | uniq -c -w 33 | sort -gr | head -n 5 | cut -c1-7,41-
Display only filenames :
find -maxdepth 1 -type f -exec md5sum '{}' ';' | sort | uniq -c -w 33 | sort -gr | head -n 5 | cut -c43-
Show Sample Output
alex@alex-box:~$ sl
The program 'sl' is currently not installed. You can install it by typing:
sudo apt-get install sl
alex@alex-box:~$ dolast
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
It's change the group id of all the files on your system that have the OLDGID group as the owner group by the new NEWGID. But first do this:
Document which files will be changed, use:
find / -gid OLDGID ! -type l > resplado-gid.txt
Be sure to disconnect users from the old group.
Stop demons or services associated with the group.
Be sure the new group exist and take note of GID
Only the first appearance of a repeated command in the history will be kept. Otherwise, if you prefer to keep last occurrence of a repeated command then maybe you can achieve that by including reverse input/output i.e with 'tac' command in expression above.
To see statistics of removed repeated commands:
diff --suppress-common-lines -y ~/.bash_history.bak ~/.bash_history|uniq -c|sort -n|tr -s " "|sed '/^ 1/d'|grep '<'
You need the RANDR support enable, to enable it with an ATI card run:
aticonfig --set-pcs-str="DDX,EnableRandr12,TRUE"
To show your available output run:
xrandr -q -d [yourdisplay]
mytop is a top like monitor for displaying Mysql server statistic and performance. Part of mytop package ,tested on Debian.
Count the occurences of the word 'Berlekamp' in the DJVU files that are in the current directory, printing file names from the one having the least to the most occurences.
This may be listed already but this command is useful to untar a specific directory to a different server.
Convert VCD to .AVI
Improvement on Coderjoe's Solution. Gets rid of grep and cut (and implements them in awk) and specifies some different mplayer options that speed things up a bit. Show Sample Output
Works even if file name contains \n. Spawns one job per core.
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: