Matt’s list of useful Linux Commands

Here is a list of commands that I find useful on a Linux command line.

  • du -sh $dir – find the size of a directory
  • grep -H -r “$string” /path/to/files – search through all files in a directory for a specific string. pipe through grep again to search through the list.

To be continued.

This entry was posted in life. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Posted October 19, 2011 at 22:36 | Permalink

    You might prefer fgrep (or add the -F) if you’re really looking for a fixed string rather than a regexp, and in any case, once you get beyond a certain point you want “ack” anyway – AKA ack-grep under Debian/Ubuntu.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>