Wednesday, December 15, 2010

File Systems 2

In the root of the filesystem (/) you have the common directories (15 of them). Here are a few.

etc-Configuration files
dev-Device files
home-Home directories for users
lost+found-Henry explained this one. It's where files go when fsck finds corrupted files.
opt-Third-party applications
root-Root user home directory

Here is the redundant stuff I was talking about earlier.

As you know cd is used to navigate the file system. That's it on cd. ls is more interesting.

ls lists files and directories.
ls -l gives you the permissions, links, date, group, and owner.
ls-a lists all files (means it lists hidden files too)
ls -i lists inode info
ls -lh shows "human-readable" output so that means things are in KB, MB etc...

Command here that I didn't know about is file.
file basically tells you what kind of file the file you're looking at is. So...
A text file might read out as text_file: ASCII text or if it's a binary it will tell you what kind of architecture it is.

Finally there's touch. touch can be used for different purposes the basic being creating a blank file like "touch blankfile". touch is also used to update the file's times. So if you wanted to change the file date of blankfile you would do touch -t yyyymmddhhmm blankfile, I believe that is self explanatory. One cool thing you can do is touch -r blankfile blankfile 2 where blankfile's time is copied to blankfile 2. Yup.

1 comment:

  1. How many more chapters do you have until you've completed all content on the test? I hope you are enjoying your Winter break, but I also hope you are on track to take the test before January 17.

    Happy New Year!

    ReplyDelete