
Terminal - All commands - 4,504 results
arecord -f dat | ssh -C user@host aplay -f dat
This is sample output - yours may be different.
yum install vixie-cron crontabs
This is sample output - yours may be different.
yum -y install bind bind-chroot caching-nameserver
This is sample output - yours may be different.
install packages
yum -y install bind bind-chroot caching-nameserver
start service
service named restart
set autostart
chkconfig named on
This is sample output - yours may be different.
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for kernel-PAE to pack into transaction set.
kernel-PAE-2.6.18-53.1.13 100% |=========================| 259 kB 00:01
---> Package kernel-PAE.i686 0:2.6.18-53.1.13.el5 set to be installed
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel-PAE i686 2.6.18-53.1.13.el5 updates 13 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 13 M
Is this ok [y/N]:
Downloading Packages:
(1/1): kernel-PAE-2.6.18- 100% |=========================| 13 MB 00:10
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: kernel-PAE ######################### [1/1]
Installed: kernel-PAE.i686 0:2.6.18-53.1.13.el5
Complete!
RHEL / CentOS Support 4GB or more RAM ( memory )
This is sample output - yours may be different.
just change SELINUX=enforcing to SELINUX=permissive, and you're done. Reboot if you want to prove it.
just change SELINUX=enforcing to SELINUX=permissive, and you're done. Reboot if you want to prove it.
openssl s_client -connect www.example.com:443 -prexit
This is sample output - yours may be different.
GET / HTTP/1.1
Host: www.example.com
read R BLOCK
HTTP/1.1 403 Forbidden
quit
---
Acceptable client certificate CA names
/C=US/O=YourOrg/OU=YourUnit/CN=YourCertificateAuthorityName1
/C=US/O=YourOrg/OU=YourUnit/CN=YourCertificateAuthorityName2
---
The key is to use the -prexit option at the command line, and then type "quit" instead of CTRL-C to exit OpenSSL. OpenSSL will then dump its last negotiated state, printing out the contents of the renegotiated handshake. Crucial for debugging client certificate configurations on web servers such as IIS, which renegotiate the SSL/TLS connection with the HTTP request in-flight to ask the client for a cert.
file /usr/bin/* | grep ELF | cut -d":" -f1
This is sample output - yours may be different.
karmic@linux64:/home/karmic64/Test$ file /usr/bin/* | grep ELF | cut -d":" -f1
/usr/bin/a2p
/usr/bin/aacplusenc
/usr/bin/aconnect
/usr/bin/acpi_fakekey
/usr/bin/acpi_listen
/usr/bin/addpart
/usr/bin/addr2line
/usr/bin/alsamixer
/usr/bin/amdcccle
/usr/bin/amidi
/usr/bin/amixer
/usr/bin/animate
/usr/bin/aplay
/usr/bin/aplaymidi
/usr/bin/appres
/usr/bin/apt-cache
This is a dirty raw way to simply list ELF objects in a folder.
The output is ready to be parsed i.e to the stripper or what else needs a path to an ELF object.
DISPLAY=":0.0" import -window root screenshot.png
This is sample output - yours may be different.
The `export` is unnecessary if it's only applicable to the one command.
export DISPLAY=":0.0" && import -window root screenshot.png
This is sample output - yours may be different.
Like the given command, but combines _DISPLAY=":0.0"_ with _export DISPLAY_ to get _export DISPLAY=":0.0"_ and only imports if DISPLAY is set successfully.
find . -type f |sed "s#.*/##g" |sort |uniq -c -d
This is sample output - yours may be different.
[user@localhost]$ find . -type f |sed "s#.*/##g" |sort |uniq -c -d
2 globals.h
9 Makefile
8 Makefile.bak
Useful for C projects where header file names must be unique (e.g. when using autoconf/automake), or when diagnosing if the wrong header file is being used (due to dupe file names)
diff -x "*CVS*" -r <path-1> <path-2> [<path-3>]
This is sample output - yours may be different.
This will cause diff to ignore any files whose path matches "*CVS*", ie any CVS control files.
This is sample output - yours may be different.
Tested on debian and ubuntu. Translations could be useless, so "LANG=C man intro" is a better alternative.
This is sample output - yours may be different.
DISPLAY=":0.0"; export DISPLAY; import -window root gotya.png
This is sample output - yours may be different.
Say if you're logged into a remote system via ssh and this system has an x window system, but yet you still want a screen shot of what's going on graphically. This will do it for you. :-)
spellcheck(){ typeset y=$@;curl -sd "<spellrequest><text>$y</text></spellrequest>" https://google.com/tbproxy/spell|sed -n '/s="[0-9]"/{s/<[^>]*>/ /g;s/\t/ /g;s/ *\(.*\)/Suggestions: \1\n/g;p}'|tee >(grep -Eq '.*'||echo -e "OK");}
This is sample output - yours may be different.
$ spellcheck motaive
Suggestions: motive motives mutative emotive motif
$ spellcheck now is the winter of our dicontent
Suggestions: discontent content contend
$ spellcheck panoply
OK
I took matthewbauer's cool one-liner and rewrote it as a shell function that returns all the suggestions or outputs "OK" if it doesn't find anything wrong. It should work on ksh, zsh, and bash. Users that don't have tee can leave that part off like this:
spellcheck(){ typeset y=$@;curl -sd "<spellrequest><text>$y</text></spellrequest>" https://google.com/tbproxy/spell|sed -n '/s="[1-9]"/{s/<[^>]*>/ /g;s/\t/ /g;s/ *\(.*\)/Suggestions: \1\n/g;p}';}
search='spelll'; curl -sd "<spellrequest><text>$search</text></spellrequest>" https://google.com/tbproxy/spell | sed 's/.*<spellresult [^>]*>\(.*\)<\/spellresult>/\1/;s/<c \([^>]*\)>\([^<]*\)<\/c>/\1;\2\n/g' | grep 's="1"' | sed 's/^.*;\([^\t]*\).*$/\1/'
This is sample output - yours may be different.
ls *.jpg | grep -n "" | sed 's,.*,0000&,' | sed 's,0*\(...\):\(.*\).jpg,mv "\2.jpg" "image-\1.jpg",' | sh
This is sample output - yours may be different.
curl -s http://www.commandlinefu.com/commands/by/$1/xml | awk -F'</?div[^>]*>' '/class=\"command\"/{gsub(/"/,"\"",$2); gsub(/</,"<",$2); gsub(/>/,">",$2); gsub(/&/,"\\&",$2); cmd=$2} /class=\"num-votes\"/{printf("%3i %s\n", $2, cmd)}'
This is sample output - yours may be different.
0 sed 's/.*/ /'
0 date -s "`curl -sI www.example.com | sed -n 's/^Date: //p'`"
0 jot -s '' -b '-' 50
7 command | sed -n '1,/regex/p'
4 curl -s search.twitter.com | awk -F'</?[^>]+>' '/\/intra\/trend\//{print $2}'
5 dig +short -x {ip}
This version prints current votes and commands for a user. Pass the user as an argument. While this technically "fits" as a one liner, it really is easier to look at as a shell script with extra whitespace. :)
alias info='info --vi-keys'
This is sample output - yours may be different.
I use this alias in my bashrc. The --vi-keys option makes info use vi-like and less-like key bindings.
myinfo() { info --subnodes -o - $1 | less; }
This is sample output - yours may be different.
For those who hate navigating info pages, a shell function which will dump the contents to stdout, then page it through less, thus acting like 'man'.
rsync -azE -e "ssh -pPortnumber" src_dir user@hostB:dest_dir
This is sample output - yours may be different.
From opposite host To copy remote to local
rsync -aE -e "ssh -pPortnumber" user@hostA:directory target_dir
curl -s -u $username:$password http://192.168.1.1/DHCPTable.htm | grep '<td>.* </td>' | sed 's|\t<td>\(.*\) </td>\r|\1|' | tr '\n' ';' | sed 's/\([^;]*\);\([^;]*\);/\2\t\1\n/g'
This is sample output - yours may be different.
192.168.1.8 Wii
192.168.1.7 laptop-dell
192.168.1.145 <none>
192.168.1.6 laptop
192.168.1.9 server
192.168.1.10 laptop-dell
192.168.1.3 TIVO
192.168.1.4 BAUER-DESKTOP
Will create a sample etc host file based on your router's dhcp list.
Now I know this won't work on most routers, so please don't downvote it just because it doesn't work for you.
tc qdisc add dev <dev> root handle 1: cbq avpkt 1000 bandwidth 100mbit;tc class add dev <dev> parent 1: classid 1:1 cbq rate 300kbit allot 1500 prio 5 bounded isolated;tc filter add dev <dev> parent 1: protocol ip prio 16 u32 match ip dst <ip> flowid 1:1
This is sample output - yours may be different.
Tc is used to configure Traffic Control in the Linux kernel. See man tc for further details.
This series of commands will limit the bandwidth of the specified device to the limit you set (300kbit in the second command) to the address you specify.
username=bartonski;curl -s http://www.commandlinefu.com/commands/by/$username/json|perl -e 'BEGIN{$s=0;$n=0};END{print "Score: $s\nEntries: $n\nMean: ";printf "%3.2f\n",$s/$n}' -0173 -nae 'foreach $f (@F){if($f =~ /"votes":"(-*\d+)"/){$s += $1; $n++;}}'
This is sample output - yours may be different.
Like command #4845, prints score, number of entries, and average score.
This is sample output - yours may be different.