събота, 29 ноември 2008 г.

tricks man find

from: http://linux-blog.org/

I wanted a quick way to be able to find out what files weren’t visible to others (and therefore, not visible to website visitors). Messing with arguments and the file command, you can do the following:
find -type f ! -perm -444

This locates all files not visible to ‘others’ in the current directory. You can apply this to directories as well:
find -type d ! -perm -111

This allows you to quickly display the 96th line of filename.php. Hope this helps someone like it has me.

head -n 96 filename.php | tail -n 1

Ever wonder how you can get a man page in into a format you can read
and print? There’s many methods of doing it (copy and paste is one) but
one the easiest I’ve found is:

man command | col -x -b > command.txt

Няма коментари: