Wednesday, January 5, 2011

Recap of File Systems and Text Processing

The File System chapter was very long so I'm not going to cover everything there but here are the relevant bits (ha bits, because later I will talk about those).

locate can locate files. By default if you use locate myfile it will return myfile if it exists and any other file/directory that containts myfile. The locate command depends on a database so if you are looking for a new file locate may not be able to find it. To update manually use updatedb or slocate -u.

find is a command like locate but with many features. It can perform a search based on...

group - Group ownership

newer - Comparison of the dates to one file

user - User ownership

mtime - Modify time

atime - Access time

You can also run the -exec parameter so if find returns something it will be returned in place of the directory.

find /home -iname -exec -f {} /some/place the returned directory goes into the brackets.

Symlinks are like shortcuts which means you can access a file that is not actually stored on a system but is on another file system.

Bits (yay). File permissions are denoted by a trio of 3 bits. 4 is read (r), 2 is write (w) and 1 is execute (x). So if you were to use chmod which changes a file's permissions so that user could rwx, group could rw and "other" just r you would do chmod 764.

There is more to the file systems but these bits (ha) are the most pertinent and I still have to write about the next chapter. Also I don't know why blogger keeps double spacing for me.

1 comment: