Usefull, for example, when many ports are exposed and the docker ps output looks cluttered. Show Sample Output
Some sites running on basic web servers don't support the HEAD request, so using "curl -I" on them doesn't work. This will automatically try "curl -I" at first and if that fails with a 4xx or 5xx status code, it falls back to "curl -i" and prints only the headers from that.
Use find . -iname "*.py" -type f -print0 | xargs -0 sed -ne 's/^\([ \t]*\)print \(.*\)$/\1print(\2)/p' to see what would be changed.
Might as well include the status code it exited with so you know right away if it failed or not.
Useful if your Docker host starts running out of disk space due to Docker debris. You should start by running "sudo docker ps" in order to check that all required containers are in fact running, and fix any that aren't before proceeding to the main event! "sudo docker rm $(sudo docker ps -q -f status=exited)" removes all containers which are no longer running. "sudo docker rmi $(sudo docker images -q -f dangling=true)" removes all Docker images not required for currently running containers.
Available since GNU Coreutils 8.24 (2015-07) Show Sample Output
Recent versions of dd provides status flag. Setting that flag to progress shows progress in realtime.
Uses the pv utility to show progress of data transfer and an ETA until completion. You can install pv via Homebrew on macOS Show Sample Output
Stat -c %n #list files. A find command is also useful Tee #use stdout, but reseend to next comand. Can be other Tee ad infinitum xargs #use de name of files to execute md5 and sha diggest.
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.
Useful in scripts to compare known malicious IP addresses with what you are actually blocking. Show Sample Output
Sends an email from the terminal.
When the wireless card is in AP mode, list the users which are connected to the network. It uses the new nl80211 based CLI configuration utility for wireless devices. It can be used, for example, in a dd-wrt based router through a telnet session to obtain client information. Show Sample Output
An easy alias for opening a manpage, nicely HTML formatted, in your set internet browser. If you get a "command exited with status 3" error you need to install groff.
Use: find . ! -readable -prune or more generally find ! -readable -prune -o -print to avoid "Permission denied" AND do NOT suppress (other) error messages AND get exit status 0 ("all files are processed successfully") Works with: find (GNU findutils) 4.4.2. Background: The -readable test matches readable files. The ! operator returns true, when test is false. And ! -readable matches not readable directories (&files). The -prune action does not descend into directory. ! -readable -prune can be translated to: if directory is not readable, do not descend into it. The -readable test takes into account access control lists and other permissions artefacts which the -perm test ignores. For find versions without -readable test, you can check permissions: find . ! -perm -g+r,u+r,o+r -prune Adapted from stackoverflow: http://stackoverflow.com/questions/762348/how-can-i-exclude-all-permission-denied-messages-from-find
Use dpkg-query to query packages.
Monitors basic wireless interface statistics, such as signal strength and discarded packets. The watch command's -n parameter sets a refresh rate of every 1 second. Show Sample Output
This command line detect ldap hosts, by mandatory dns entry, then ping them to detect response average. based on ping response average it sorts and print the faster server in first output line Show Sample Output
Sets the size of the disk to $DISKSIZE so that the percentage readout of pv is correct. set /dev/sdb to whatever your disk is /dev/sdX. Next pipe dd to pv, then pipe pv to gzip so that you get a gzipped image file. Show Sample Output
cd $target_dir then run the command for fast removal of millions of files
Muestra el crecimiento de un archivo por segundo. Cambia el texto "FILE" por el nombre del archivo a monitorear. Comando STAT
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: