Check These Out
Using this command you can track a moment when usb device was attached.
you can just use one awk script to parse the rss feed. No need to pipe so many awk's and sed's. Its ugly and inefficient.
Enter your ssh public key in the remote end for future key-based authentication. Just type your password one last time. The next time you should be able to login with the public key. If you don't have a key, generate one with ssh-keygen.
Requires Bourne-compatible shell in the remote end.
This will generate the same output without changing the current directory, and filepath will be relative to the current directory.
Note: it will (still) fail if your iTunes library is in a non-standard location.
Using just globing
Normally, if you su to another user from root and try to resume that other user's screen session, you will get an error like "Cannot open your terminal '/dev/pts/0' - please check." This is because the other user doesn't have permission for root's pty. You can get around this by running a "script" session as the new user, before trying to resume the screen session. Note you will have to execute each of the three commands separately, not all on the same line as shown here.
Credit: I found this at http://www.hjackson.org/blog/archives/2008/11/29/cannot-open-your-terminal-dev-pts-please-check.
used in an if-then-else in case the default shell is ksh, not bash.
The $(basename ${0#-}) is handy to echo which shell and strip the dash some flavors put in front of "bash"
if [ $(basename ${0#-}) == "bash" ] ; then
export PS1='\[\e]0;\h \u \w\a\]\n\[\e[0;34m\]\u@\h \[\e[33m\]\w\[\e[0;32m\]\n\$ '
else
HOST=`hostname`
ESC=`echo "\033"`
BEL=`echo "\007"`
RAW=`echo "\r"`
export PS1='-${RAW}${ESC}]0;${HOST} ${USER}${BEL}-${ESC}[0;34m${USER}${ESC}[0m@${ESC}[0;34m${HOST%%.*}${ESC}[0;33m${ESC}[0m $ '
fi
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.
This can be useful for transforming command-line args into input for xargs (one per line). This can also be done with ls if the args are filenames, but that's getting awfully close to Useless Use of Cat territory (http://partmaps.org/era/unix/award.html).