GenWikiLinux
From birchyHistory
(→Create shortcuts in Linux (symbolic links)) |
|||
Line 15: | Line 15: | ||
OPTIONS: | OPTIONS: | ||
-i ignore case | -i ignore case | ||
+ | -r recursive files inclusion | ||
+ | -F Fast search using literal search term, not regEx | ||
-n print line #s | -n print line #s | ||
-l just show filenames | -l just show filenames | ||
Line 21: | Line 23: | ||
-m, --max-count=NUM stop after NUM matches | -m, --max-count=NUM stop after NUM matches | ||
-a text files only | -a text files only | ||
− | + | ||
+ | -iFr ignore case, simple string search, search current directory and subdirectories | ||
− | '''egrep''' | + | '''egrep''' is replaced with '''grep -E''') |
+ | '''fgrep''' is replaced with '''grep -F''') | ||
− | + | Can pipe the output of another command | |
+ | ls |grep blah lists all files in the current directory whose names contain the string "blah" | ||
− | + | ==Create shortcuts in Linux (symbolic links)== | |
− | + | ln -s /pathToTarget nameOfTheLink | |
− | + | ||
− | + | e.g. ln -s /var/www/html/public_html/ webDirectory | |
+ | ln creates hard and soft links. The -s option create soft (symbolic) links to resources in other directories, even other drives. |