10 Useful Linux Commands

Filed under

Here's a list of 10 commands which may come handy when using the command line in Linux:

Search for all files modified in the last N days containing a specific text in their name

find DIR -mtime -N -name "*TEXT*"

For example:

find ~ -mtime -5 -name "*log*"

Will display all the files modified in the past 5 days which include the text 'log' in their filename.

Determine which processes use the most memory

ps aux | sort -nk 4 | tail

Will show the first 10 processes which use the most memory, using ascendant sorting. Alternately: