
Terminal - All commands - 10,560 results
kill_daemon() { echo "Daemon?"; read dm; kill -15 $(netstat -atulpe | grep $dm | cut -d '/' -f1 | awk '{print $9}') }; alias kd='kill_daemon
This is sample output - yours may be different.
Just find out the daemon with $ netstat -atulpe. Then type in his name and he gets the SIGTERM.
dpkg-query -W | grep perl
This is sample output - yours may be different.
libapparmor-perl 2.5-0ubuntu3
libauthen-sasl-perl 2.13-1
libbit-vector-perl 7.1-1
libcache-perl 2.04-2
libcairo-perl 1.061-1build1
libcarp-clan-perl 6.02-1
libclass-accessor-perl 0.34-1
libclass-data-inheritable-perl 0.08-1
libclass-errorhandler-perl 0.01-2
libclass-singleton-perl 1.4-1
libcompress-raw-bzip2-perl 2.021-1
libcompress-raw-zlib-perl 2.023-1
libcompress-zlib-perl 2.022-1
libconvert-asn1-perl 0.22-1
libdate-manip-perl 6.05-1
libdatetime-format-mail-perl 0.3001-1
libdatetime-format-w3cdtf-perl 0.05-1
libdatetime-locale-perl 1:0.44-1
libdatetime-perl 2:0.5200-1
libdatetime-timezone-perl 1:1.10-1+2010b
libdbd-mysql-perl 4.012-1ubuntu1
libdbi-perl 1.609-1build1
libdigest-sha1-perl 2.12-1build1
liberror-perl 0.17-1
libfeed-find-perl 0.06-2
libfile-basedir-perl 0.03-0.1build1
libfile-copy-recursive-perl 0.38-1
libfile-desktopentry-perl 0.04-2
libfile-mimeinfo-perl 0.15-1
libfile-nfslock-perl 1.20-2
libfile-slurp-perl 9999.13-1
libfinance-yahooquote-perl 0.22
libfont-afm-perl 1.20-1
libfreezethaw-perl 0.45-1
libglib-perl 1:1.222-1
libgnome2-canvas-perl 1.002-2build1
libgnome2-perl 1.042-2build1
libgnome2-vfs-perl 1.081-1build1
libgraphics-magick-perl 1.3.5-6
libgtk2-perl 1:1.221-4ubuntu2
libheap-perl 0.80-2
libhtml-format-perl 2.04-2
libhtml-parser-perl 3.64-1
libhtml-tagset-perl 3.20-2
libhtml-template-perl 2.9-1
libhtml-tree-perl 3.23-1
libinline-perl 0.45-1
libio-compress-base-perl 2.022-1
libio-compress-perl 2.022-1
libio-compress-zlib-perl 2.022-1
libio-socket-ssl-perl 1.31-1
libio-string-perl 1.08-2
liblist-moreutils-perl 0.25~02-1
liblocale-gettext-perl 1.05-6
liblwp-authen-wsse-perl 0.05-1
libmail-sendmail-perl 0.79.16-1
libmailtools-perl 2.05-1
libmldbm-perl 2.01-3
libnet-daemon-perl 0.43-1
libnet-dbus-perl 0.33.6-1build3
libnet-ldap-perl 1:0.39-1ubuntu1
libnet-ldap-server-perl 0.4-2
libnet-libidn-perl 0.12.ds-1
libnet-ssleay-perl 1.35-2ubuntu1
libnet-xmpp-perl 1.02-1
libpango-perl 1.221-2
libparams-validate-perl 0.93-1
libparse-debianchangelog-perl 1.1.1-2ubuntu2
libparse-recdescent-perl 1.963+dfsg-1
libperl5.10 5.10.1-8ubuntu2
libplrpc-perl 0.2020-2
librpc-xml-perl 0.72-1
libsub-name-perl 0.04-1build1
libsvn-perl 1.6.6dfsg-2ubuntu1
libsys-hostname-long-perl 1.4-2
libterm-readkey-perl 2.30-4build1
libterm-readline-perl-perl 1.0303-1
libterm-size-perl 0.2-4build3
libtext-charwidth-perl 0.04-6
libtext-iconv-perl 1.7-2
libtext-wrapi18n-perl 0.06-7
libtie-ixhash-perl 1.21-2
libtimedate-perl 1.1900-1
liburi-fetch-perl 0.08-1
liburi-perl 1.52-1
libuser-perl 1.6-2
libuuid-perl 0.02-3build2
libwww-perl 5.834-1
libwww-search-perl 2.50.70.debian.2
libxml-atom-perl 0.37-1
libxml-feed-perl 0.43+dfsg-1
libxml-libxml-perl 1.70.ds-1
libxml-libxslt-perl 1.70-1
libxml-namespacesupport-perl 1.09-3
libxml-parser-perl 2.36-1.1build3
libxml-rss-perl 1.47-1
libxml-sax-expat-perl 0.40-1
libxml-sax-perl 0.96+dfsg-2
libxml-stream-perl 1.22-4
libxml-twig-perl 1:3.32-3ubuntu1
libxml-xpath-perl 1.13-7
libyaml-syck-perl 1.07-1build1
perl 5.10.1-8ubuntu2
perl-base 5.10.1-8ubuntu2
perl-modules 5.10.1-8ubuntu2
IMVHO if you are using cpan to install perl modules you are doing it wrong.
FOR /f %%g in ('echo %1 ^| iconv -f gbk -t utf-8') DO curl -x proxy:port -u user:pass -d status=%%g -d source="cURL" http://twitter.com/statuses/update.xml
This is sample output - yours may be different.
Aside from curl one will need iconv windows binary since windows lacks a native utf-8 cli interface. In my case I need a proxy in China and iconv to convert gbk status string into utf-8. GnuWin32 is a good choice with loads of coreutils natively ported to Windows
"FOR /f" is the solution to pass iconv output to curl.
Printing portion of a big file
This is sample output - yours may be different.
If you need to print some portion of a huge file, let's say you want to print from line 200 to 300, you can use this command to print the line from LINE1 to LINE2 of file FILE.
This is sample output - yours may be different.
dd if=/dev/urandom of=/dev/speaker bs=1
This is sample output - yours may be different.
Sends random beeps to your PC-speaker. Think... You can also run it remotely on another computer using SSH and scare its user! Don't forget to run it on your dedicated hosting server and watch sysadmin's action from data-center's live remote cameras!
awk 'END {print NR}' /etc/passwd
This is sample output - yours may be different.
dd if=/dev/urandom of=/dev/dsp
This is sample output - yours may be different.
Sends random sounds to your sound card output (e.g. your speaker). Think... You can also run it remotely on another computer using SSH and scare its user!
This is sample output - yours may be different.
export var1=`ps -A | grep '[u]nique' | cut -d '?' -f 1`; echo${var1/ /}; kill -9 $var1
This is sample output - yours may be different.
This will kill a specific process you don't know the PID of, when pidof and pgrep are not available, for example on OS X. var1 is created so that the whitespace can be trimmed before passing off to kill.
join file1.txt file2.txt > file3.txt
This is sample output - yours may be different.
apt-get search something | grep specific
This is sample output - yours may be different.
$ apt-get search firefox | grep
gnome-do-plugins-firefox : gnome-do-plugins for firefox
gnome-do-plugins : Plugins for GNOME Do
replace apt-get with your distro's package manager.
Where 'something' is the package name, and 'specific' is what you're specifically looking for.
This helps if your query is 2+ words long.
grep -A 3 -i "example" demo_text
This is sample output - yours may be different.
python -c "import socket; print '\n'.join(socket.gethostbyname_ex(socket.gethostname())[2])"
This is sample output - yours may be different.
The socket.gethostname() call returns the host name of the computer. The socket.gethostbyname_ex() call returns a list of three items: The host name, the list of aliases for this host, and a list of IP addresses. Recall that Python?s array starts with index 0, the socket.gethostbyname_ex(?)[2] expression refers to the list of IP addresses. Finally, the print statement prints out the IP addresses, one per line.
This is sample output - yours may be different.
This is sample output - yours may be different.
nawk '{line[NR]=$0} END{for (; NR>=1; NR--){print line[NR]}}' FILENAME
This is sample output - yours may be different.
This is sample output - yours may be different.
for i in $(file * | grep broken | cut -d : -f 1); do rm $i; done
This is sample output - yours may be different.
scp -P 22 /home/svnlabs.txt root@92.178.0.56:/home/svnlabs.txt
This is sample output - yours may be different.
Upload file to remote server using SCP
telnet zerocarbs.wooters.us
This is sample output - yours may be different.
--------------------------------------------------------------------------------
* _ _ *
* __ _____ ___ | |_ ___ _ __ ___ _ _ ___| | *
* \ \ /\ / / _ \ / _ \| __/ _ \ '__/ __|| | | / __| | *
* \ V V / (_) | (_) | || __/ | \__ \| |_| \__ \_| *
* \_/\_/ \___/ \___/ \__\___|_| |___(_)__,_|___(_) *
* zerocarbs.wooters.us - fewer calories and 0 carbs 12:48AM CST *
--------------------------------------------------------------------------------
* Woot! Auria 26? 720p LCD HDTV *
* Price: $249.99 Condition: New Plenty left *
--------------------------------------------------------------------------------
* Shirt.Woot! Devostation *
* Price: $10.00 Condition: Mutually Assured Plenty left *
--------------------------------------------------------------------------------
* Wine.Woot! White Zeppelin 2009 Chardonnay - 3 Pack *
* Price: $39.99 Condition: White Sold out *
--------------------------------------------------------------------------------
* Sellout.Woot! Skil Isio 2-in-1 Shrub Trimmer and Grass Shear *
* Price: $34.99 Condition: New Plenty left *
--------------------------------------------------------------------------------
* Kids.Woot! Clifford the Big Red Dog Toy Organizer *
* Price: $19.99 Condition: New Plenty left *
--------------------------------------------------------------------------------
Gives you an updating woot! item tracker!
scp /home/svnlabs.txt root@92.178.0.56:/home/
This is sample output - yours may be different.
find ~/Desktop/ \( -regex '.*/\..*' \) -print -exec rm -Rf {} \;
This is sample output - yours may be different.
maggie:~ root# find ~/Desktop/ \( -regex '.*/\..*' \) -print -exec rm -Rf {} \;
~/Desktop/.DS_Store
~/Desktop/.fseventsd
watch -n 1 uptime\;myqladmin --user=<user> --password=<password> --verbose processlist
This is sample output - yours may be different.
Useful for monitoring both MySQL and the server load at the same time.
ps -ef | grep [j]boss | awk '{print $2}'|xargs kill -9
This is sample output - yours may be different.
Removed unneeded grep -v by making the initial grep unable to match itself.