

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 19.2K Views
What's your favorite tool/cmd in Linux?
The command "find" is one of my favorites -
Search for files in /search/path/ which are older than 5 days.
(if you want to search for directories, then use: -type d )
find /search/path/ -type f -mtime +5 -print
find /search/path/ -type d -mtime +5 -print
If you want to do something with those files after you've found them, use: -exec <somecmd> '{}' \;
Example, delete files older than 50 days in the /search/path directory
find /search/path/ -type f -mtime +50 -exec rm '{}' \;
If only there is a 'find' equivalent in the real world ... now, where did I put my keys?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,918 Views
I get more use out of grep either directly or in a pipe. The color option has really helped me identify my find and I am also a fan of the -A and -B options to show context. These display the matching line and the specfied number of lines After or Before.
$ grep -i '^<directory' -A5 /etc/httpd/conf/httpd.conf
I also use a lot of cd - to flip back and forth between directories and CTR-r to search history.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,747 Views
I agree with you. I love grep, especially when filtering through a large amount of data using grep piped to grep with regular expressions. The -v option is great for eliminating lines that contain strings that are NOT included in the lines you are looking for.
grep '^Apr 1 15:5[34].*ERROR' /var/log/messages | grep -v '[az0-9]\{32\}'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,899 Views
Hah, easye one: man


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,894 Views
love man and how you can look up help anywhere with or without internet , Also ps -ef has been by far my favorite followed by a kill -9

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,630 Views
@fuadar wrote:ps -ef has been by far my favorite followed by a kill -9
pgrep and pkill are going to rock your world.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,562 Views
I recently discovered kill -15.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,881 Views
Don't know about favorite, byt here's my most used commands from my bash history: ssh, nmcli, ls, sudo, cd, ansible, rm, rsync, cat, man, less, mv, curl, dnf, echo, scp, python, top, perl


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,661 Views
Apparently my own favorite is dnf. Lol.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 7,879 Views
Mine is not a command per se (at least not in the normal sense) but is the capabilities enabled by the pipe character. I've lost count how many ways I've been able to construct complex one-liners using the pipe character, to enormously beneficial effect.