Especially good for exported ipython files Show Sample Output
Check out Gate number for your flight from CLI with Chrome, html2texgt and grep. Works on Arch Linux (Garuda) and probably will work on others. Requirements: * google chrome (might work with chromium as well) * installed html2text (on archlinux: sudo pacman -S python-html2text) * installed grep (comes by default with your OS) * the gate number should be visible at the given website (it's not existent too early before the flight and also disappears after the flight departed) Please don't forget to replace the link to appropriate one, matching your flight. You can also wrap this into something like `whlie true; do ...; sleep 60; done' and this will check and tell you the gate number maximum in 1 minute after it appears on Avinor website. Show Sample Output
Show temp of all disk with the drivetemp module activate Show Sample Output
You cannot kill zombies, as they are already dead. But if you have too many zombies then kill parent process or restart service. You can kill zombie process using PID obtained from the above command. For example kill zombie proces having PID 4104: # kill -9 4104 Please note that kill -9 does not guarantee to kill a zombie process.
This script first find all files which contains word xxxxx recursively. Then replace the word xxxxx to yyyyy of the files. Use case: - Web site domain change - Function name change of the program
show physical disk using, except tmpfs, gvfs, and so on.
only works for freeBSD where ports are installed in /usr/ports credit to http://wiki.freebsd.org/PortsTasks
finds all forms instanciated into a symfony project, pruning svn files.
To save the result, redirect the output to another file.
grep -v "^$" file1 > file2
From 'man netstat' "netstat -i | -I interface [-abdnt] [-f address_family] [-M core] [-N system] Show the state of all network interfaces or a single interface which have been auto-configured (interfaces statically configured into a system, but not located at boot time are not shown). An asterisk (``*'') after an interface name indicates that the interface is ``down''. If -a is also present, multicast addresses currently in use are shown for each Ethernet interface and for each IP interface address. Multicast addresses are shown on separate lines following the interface address with which they are associated. If -b is also present, show the number of bytes in and out. If -d is also present, show the number of dropped packets. If -t is also present, show the contents of watchdog timers."
Output: Version 3.2-0 (for example if you type # aptitude show bash | grep Vers Depends on the language of your distribution, because the name of the word "Version" in other languages may be different.
The large context number (-C 1000) is a bit of a hack, but in most of my use cases, it makes sure I'll see the whole log output.
This adds all new files to SVN recursively. It doesn't work for files that have spaces in their name, but why would you create a file with a space in its name in the first place?
This command will replace all instances of 'foo' with 'bar' in all files in the current working directory.
This command will replace all instances of 'foo' with 'bar' in all files in the current working directory and any sub-directories.
Quick and easy way of validating a date format of yyyy-mm-dd and returning a boolean, the regex can easily be upgraded to handle "in betweens" for mm dd or to validate other types of strings, ex. ip address. Boolean output could easily be piped into a condition for a more complete one-liner.
This is a simple but useful command to search for multiple terms in a file at once. This prevents you from having to do mutliple grep's of the same file. Show Sample Output
This is useful for displaying a portion of a FILE that contains an error at line NUMBER
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: