Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Instead of using `grep "(1)"`, use the `-s` switch:

    $ apropos -s1 copy
    bsdcpio (1)          - copy files to and from archives
    cp (1)               - copy files and directories
    dd (1)               - convert and copy a file
    ....


I think it's better to use grep. Knowing the options to apropos has very low value. Knowing grep has lots and lots of value.


I agree. I have no idea how to use `find`. I always do `find . | grep whatever`, since I know the basics of grep.


Learning find is a worthy investment.

    find ./ -name "*.log" -size +2G -ctime +3 | xargs -P 8 gzip
Will find all log files over 2 gigs and older than 3 days. Then it will gzip them split across 8 parallel gzip processes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: