14
votes
2answers
265 views

Open man page and search for string in a single command

Instead of doing man chmod and then /a+x to jump to the first section in the chmod man page that mentions a+x, I would like to know if there is a way to open the man page to a specific search string, ...
1
vote
3answers
4k views

List all files in a directory recursively but exclude directories themselves

Simple question, I'm running the following find command: find . -type d \( -path ./.git -o -path ./log -o -path ./public -o -path ./tmp \) -prune -o -print To list all the files in my directory, ...
3
votes
1answer
2k views

How to do multiline search and replace text (delete) recursively

I want to go recursively through a directory and search for specific content in all files. The content should then be replaced if found. With a single line I would make something like this: find . ...
2
votes
2answers
997 views

How to remove error messages when searching recursively for a string?

I use find -type f -print0 | xargs -0 -n 10 grep -i searchstring to search recursively for a string. But it also gives me error messages like "permission denied". How can I avoid such error messages ...
3
votes
3answers
159 views

Detecting whether a server is loaded

I have to start some performance test on a Rhel 6 box, but before starting the test, i have to make sure there are no other java processes running. The manual way of doing it would be to use "ps -ef ...
4
votes
2answers
81 views

Fail to use “locate”

I have a file named Fubini's_theorem.html under some directory. But both locate "Fubini's_theorem" or locate Fubini do not return anything. The file has been there for months, and I am sure ...
5
votes
2answers
239 views

Is there a web site to search in the file contents of default installations of different linux distributions?

The text string "Network services, Internet style" is found in the first line of the file /etc/services on a computer running Ubuntu 11.04 erik@laptop:~$ head -1 /etc/services # Network services, ...