Good if only you have access to host1 and host2, but they have no access to your host (so ncat won't work) and they have no direct access to each other.
In this example we convert a .tar.bz2 file to a .tar.gz file. If you don't have Pipe Viewer, you'll have to download it via apt-get install pv, etc. Show Sample Output
I use zenity because it's a rewrite of gdialog and also replaces gmessage and has more useful options. Using --text-info allows you to select and copy the text to your clipboard. To see a file in a list dialog: cat /etc/passwd | zenity --width 800 --height 600 --list --column Entries If you don't have zenity, you'll have to download it via apt-get install zenity, etc.
This searches the Apache error_log for each of the 5 most significant Apache error levels, if any are found the date is then cut from the output in order to sort then print the most common occurrence of each error. Show Sample Output
Open files in tabs
Interfaces like lo can be omitted from the beginning, there are probably better ways of doing this, i'm a noob at awk. Show Sample Output
To do hex to binary: echo 'ibase=16; obase=2; 16*16' | bc # prints: 111100100 To do 16*16 from decimal to hex: echo 'ibase=10; obase=16; 16*16' | bc # prints: 100 You get the idea... Alternatively, run bc in interactive mode (see man page) Show Sample Output
This should automatically mount it to /media/truecrypt1. Further mounts will go to /media/truecrypt2, and so on. You shouldn't need sudo/su if your permissions are right. I alias tru='truecrypt' since tr and true are commands. To explicitly create a mount point do: tru volume.tc /media/foo To make sure an GUI explorer window (nautilus, et al) opens on the mounted volume, add: --explorer To see what you currently have mounted do: tru -l To dismount a volume do: tru -d volume.tc. To dismount all mounted volumes at once do: tru -d Tested with Truecrypt v6.3a / Ubuntu 9.10
This command will give you the detailed information about the installed perl modules i.e. installed path, Link type, version, files etc. Show Sample Output
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 +
It's all said in the title. Show Sample Output
you can use xmlstarlet to parse output instead of perl
-o acts like :spit. Use -O (capital o) for side-by-side like :vsplit. Use vim -d or vimdiff if you need a diff(1) comparison. To split gnu Screen instead of vim, use ^A S for horizontal, ^A | for vertical.
For BSD-based systems, including OS X, that don't have seq.
This version provides a default using tput in case $COLUMNS is not set:
jot -b '#' -s '' ${COLUMNS:-$(tput cols)}
Show Sample Output
Pure Bash
This will print a row of characters the width of the screen without using any external executables. In some cases, COLUMNS may not be set. Here is an alternative that uses tput to generate a default if that's the case. And it still avoids using tr.
printf -v row "%${COLUMNS:-$(tput cols)}s"; echo ${row// /#}
The only disadvantage to either one is that they create a variable.
Show Sample Output
Just added -sn1 -s = silent -n1 = only one symbol needed to continue after the insert Show Sample Output
Displays battery power status Show Sample Output
Deletes all files in a folder that are NOT *.foo, *.bar or *.baz files. Edit the pattern inside the brackets as you like. Show Sample Output
gentoo only or gentoo-like linux distributions. Show Sample Output
Waiting for a key stroke. You can use this with a ";" behind to build a command chain. 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: