For those of us that still uses lynx :)
Recursive grep through directory for file.
HP UX doesn't have a -a switch in the ifconfig command. This line emulates the same result shown in Solaris, AIX or Linux Show Sample Output
Add an alias to your .bashrc that allows you to issue the command xkcd to view (with gwenview) the newest xkcd comic... I know there are thousands of them out there but this one is at least replete with installer and also uses a more concise syntax... plus, gwenview shows you the downloading progress as it downloads the comic and gives you a more full featured viewing experience.
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. Show Sample Output
This assumes your local ip starts with 192.something (e.g. 192.168), it greps ifconfig output for an ip that starts with 192, then strips the extra garbage (besides the ip) Maybe `ifconfig | grep addr | grep Bcast` would also do it Show Sample Output
IMVHO if you are using cpan to install perl modules you are doing it wrong. Show Sample Output
grep - Search file for character string Search for one or more strings in one or more files. Examples:- grep that myfile.txt Look for the string ``that'' in the file called ``myfile.txt'' and print out each line that matches. egrep -in "this|that" *.dat Extended grep search *.dat files for ``this'' or ``that'' case insensitive (-i) and where found print line number (-n) along with the line contents. Show Sample Output
Finds a string in files recursively below the current directory on systems without the "egrep" and its "-r" functionality. Show Sample Output
grep '^[^#]' sample.conf \__/ |||| \_________/ | |||| | | |||| \- Filename | |||| | |||\- Only character in group is '#' | ||| | ||\- Negate character group (will match any cahracter *not* in the | || group) | || | |\- Start new character group (will match any character in the | | group) | | | \- Match beginning of line | \- Run grep Empty lines will also be not matched, because there has to be at least one non-hash-sign character in the line. Show Sample Output
Check if Fail2Ban is running on the system and alert it with a message in the terminal Show Sample Output
Shows all linked file and destinations. The 'ls -l' command lists the files in long (1 file per line) format, and the grep command displays only those lines that starts with an l (lower case L) -- a linked file. Updated: Remove reference to hard links because this command does not apply to hard link as others kindly pointed out. Show Sample Output
Get the IP address of all your network cards. Show Sample Output
-f file -v invert-match : invert the sense of matching, to select non matching lines
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. Show Sample Output
search_criteria = what do you want to kill pid = pid of you dont kill
Removed unneeded grep -v by making the initial grep unable to match itself.
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: