Linux file hierarchy System
file system is a logical collection of files on a partition or disk. A partition is a container for information and can span an entire hard drive if desired.
Your hard drive can have various partitions which usually contains only one file system, such as one file system housing the / file system or another containing the /home file system.
One file system per partition allows for the logical maintenance and management of differing file systems.
Everything in Unix is considered to be a file, including physical devices such as DVD-ROMs, USB devices, floppy drives, and so forth.
A UNIX filesystem is a collection of files and directories that has the following properties:
file system is a logical collection of files on a partition or disk. A partition is a container for information and can span an entire hard drive if desired.
Your hard drive can have various partitions which usually contains only one file system, such as one file system housing the / file system or another containing the /home file system.
One file system per partition allows for the logical maintenance and management of differing file systems.
Everything in Unix is considered to be a file, including physical devices such as DVD-ROMs, USB devices, floppy drives, and so forth.
Directory Structure:
Unix uses a hierarchical file system structure, much like an upside-down tree, with root (/) at the base of the file system and all other directories spreading from there.A UNIX filesystem is a collection of files and directories that has the following properties:
- It has a root directory (/) that contains other files and directories.
- Each file or directory is uniquely identified by its name, the directory in which it resides, and a unique identifier, typically called an inode.
- By convention, the root directory has an inode number of 2 and the lost+found directory has an inode number of 3. Inode numbers 0 and 1 are not used. File inode numbers can be seen by specifying the -i option to ls command.
- It is self contained. There are no dependencies between one filesystem and any other.
Directory | Description |
---|---|
/ | This is the root directory which should contain only the directories needed at the top level of the file structure. |
/bin | This is where the executable files are located. They are available to all user. |
/dev | These are device drivers. |
/etc | Supervisor directory commands, configuration files, disk configuration files, valid user lists, groups, ethernet, hosts, where to send critical messages. |
/lib | Contains shared library files and sometimes other kernel-related files. |
/boot | Contains files for booting the system. |
/home | Contains the home directory for users and other accounts. |
/mnt | Used to mount other temporary file systems, such as cdrom and floppy for the CD-ROM drive and floppy diskette drive, respectively |
/proc | Contains all processes marked as a file by process number or other information that is dynamic to the system. |
/tmp | Holds temporary files used between system boots |
/usr | Used for miscellaneous purposes, or can be used by many users. Includes administrative commands, shared files, library files, and others |
/var | Typically contains variable-length files such as log and print files and any other type of file that may contain a variable amount of data |
/sbin | Contains binary (executable) files, usually for system administration. For example fdisk and ifconfig utlities. |
/kernel | Contains kernel files |
Navigating the File System:
Now that you understand the basics of the file system, you can begin navigating to the files you need. The following are commands you'll use to navigate the system:Command | Description |
---|---|
cat filename | Displays a filename. |
cd dirname | Moves you to the directory identified. |
cp file1 file2 | Copies one file/directory to specified location. |
file filename | Identifies the file type (binary, text, etc). |
find filename dir | Finds a file/directory. |
head filename | Shows the beginning of a file. |
less filename | Browses through a file from end or beginning. |
ls dirname | Shows the contents of the directory specified. |
mkdir dirname | Creates the specified directory. |
more filename | Browses through a file from beginning to end. |
mv file1 file2 | Moves the location of or renames a file/directory. |
pwd | Shows the current directory the user is in. |
rm filename | Removes a file. |
rmdir dirname | Removes a directory. |
tail filename | Shows the end of a file. |
touch filename | Creates a blank file or modifies an existing file.s attributes. |
whereis filename | Shows the location of a file. |
which filename | Shows the location of a file if it is in your PATH. |
Thanks for sharing this informative blog on Linux Training . If you are still in doubt, whether to take the plunge or not. Here are few points that might change your opinion! Also UrbanPro.com Help you by connecting you to the best Linux Training Classes in your locality
ReplyDeleteVisit link below For more www.urbanpro.com/linux-training?_r=offpage
“ Guitar Classes ”
Thanks for sharing this informative blog on Linux Training . If you are still in doubt, whether to take the plunge or not. Here are few points that might change your opinion! Also UrbanPro.com Help you by connecting you to the best Linux Training Classes in your locality
ReplyDeleteVisit link below For more www.urbanpro.com/linux-training?_r=offpage
“ Guitar Classes ”
Thanks for sharing this information You may also refer http://www.s4techno.com/linux-administration-training-online/ for more information…
ReplyDeleteLinux Trainng in Chennai
ReplyDeleteRed Hat Trainng in Chennai
Excellent and very cool idea and the subject at the top of magnificence and I am happy to this post. Interesting post! Thanks for writing it.
ReplyDeletelinux training in india
I have also attended Open Workshop Calendar in Delhi Ncr by a well known IT /Non IT Corporate Training in India
ReplyDeleteVery useful details provided by you. I hope it would be useful for many of the seekers. Thank you for sharing details here with us.
ReplyDeleteHome tutors are provided by TheTuitionTeacher in Delhi.
Home Tutors in Delhi | Home Tuition service
Thanks for sharing this informative blog on unix file system basics.
ReplyDeletelinux training in mumbai
linux course in mumbai
APTRON has designed its RHCE training for IT professional and wannabes who seek to achieve practical skills of networking and security administration. Our RHCE training project is armed with the faculties who are IT professional with more 10 year experience in core area and filled with technical knowledge and real world experience with the significant spotlight on practical knowledge with the end goal of giving required skills to a Linux administrator's job assignments.
ReplyDeleteFor More Info:- Linux Training in Gurgaon
Great post. Thanks for sharing such a useful information. Linux training
ReplyDeleteEveryone participating in anything has to start somewhere, Best Architecture services in kanpur in this industry you will undoubtedly start small and if you put time and effort into your blog you may become successful. Most small time bloggers will use free blog hosting services and this I think is a great platform for inexperienced bloggers and people whom are trying to get a feel of how the Photo background removal services company whole blog industry and system works
ReplyDeleteWith an independent blog website development company kanpur site you must have paid hosting, knowledge of scripts and plugins etc in order to provide a decent platform for your blog audience whereas here you can put your sole focus onto providing top quality content and all the back Photo Clipping path services company end technical stuff is covered.
The main advantages of having a free blog hosting Thetodaytalk.com service is that if your blog does not become popular or successful you have not lost out. No costs incurred apart from the time you invested into writing the content.
Very Good post About Linux, Thanks..
ReplyDeleteRHCSA Certification Training online
RHCE Certification Training online
great post keep postinglinux course in pune
ReplyDelete