Your SlideShare is downloading. ×
0
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
File system discovery
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

File system discovery

372

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
372
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
26
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. File System Discovery -
  • 2. Question ?What do you know about File System ?
  • 3. What is file system ?> Method of storing and organizing computer filesand their data.> Essentially, it organizes these files into adatabase for the storage, organization,manipulation, and retrieval by the computersoperating system. Eg:- fat, ntfs, ext4, ext3.......
  • 4. What is file system hierarchy ?To put it simply, it can be visualized as a tree with its roots and all.At the top of the hierarchy is invariably the root path which is represented by / and all other directories are created beneaththis root path in linux.
  • 5. Different from WindowsWindows starts with drives, which areexplicit– C:– D:
  • 6. Root !!In Windows, every drive has its own root C:is the root of the C driveIn Linux, there is only one root, no matterhow many drives you may have– In Linux, / is the rootRoot is ambiguous in one respect, since it canrefer to the top of the file structure, and isalso the name of the Administrator typeaccount in Linux.
  • 7. AttentionWindows uses a backslash for everythingLinux uses a forward slash for everythingIn Windows, the logical drive (e.g. C:) is animportant part of the directory structureIn Linux, logical drives dont mean much. You caneven mount a separatephysical drive under a directory that is on anotherdrive.In Windows, case does not matterIn Linux, everything is case sensitive.
  • 8. Drives vs. directoriesIn Windows, drives are directoriesIn Linux, you can have several drivesall under one overall directory
  • 9. Standard?Distros can vary, but so can programsWhen you install a program, it may not followthe FHS in deciding where to place its files
  • 10. /This is the symbol for the root of the filesystem in LinuxEvery directory is “under” root, ultimatelyThis is not the same as the user “root”, whichis the user with God-like powers over thesystemThe user “root” does have a directory, called /root
  • 11. Let’s Zoooooooooooom
  • 12. /binContains many of the commands used on thecommand lineExamples include cat, chmod,dmesg, kill, ls,mkdir more, ps, pwd, sed, suthe above commands, and many others,must be in /bin to meet the standard.Other commands can be optionally included,such as tar. gzip, netstat, and ping
  • 13. /bootContains files needed for boot – kernel – Grub menu (good to know if you aredualbooting) – Lilo boot sector backupsContains data that is used before the kernelstarts executing user-mode programs
  • 14. /devKinda-sorta an equivalent to a mashup of theDevice Manager and C:WindowsSystem inWindowsContains a file describing every device, andthese files can send data to each deviceIn Linux, everything is a file or a directory
  • 15. /dev 2hda1, hda2, etc. are partitions on the firstphysical IDE drivesda1, sda2, etc. are partitions on the firstphysical SATA drive/dev/cdrom is the optical drive/dev/fd0 is the floppy drive, if you have one/dev/dsp is the speaker device
  • 16. /etcPerhaps the most important to understandNo binaries can be here, per the standardThis is just for configuration filesExamples include /etc/inittab, /etc/fstab ,/etc/passwd , /etc/hosts, /etc/x11, and /etc/opt
  • 17. /etc 2These files are generally text files and can beedited using any text editor:emacs or vi onthe command line, or whatever graphicalequivalent (e.g. gedit, kate) your desktopoffers
  • 18. /etc/inittabDescribes what takes place at bootup Includesthe runlevel of the system, and whichprocesses should be run at each runlevelLinux has seven runlevels, from 0-6
  • 19. /etc/fstabAutomatically mounts file systems acrossmultiple drives or partitions, or even fromremote systemsThis file tells the system what drive to access,and where to mount it in your system
  • 20. /etc/fstabAutomatically mounts file systems acrossmultiple drives or partitions, or even fromremote systemsThis file tells the system what drive to access,and where to mount it in your system
  • 21. /etc/hostsThis is the famous hosts file, which matchesup names with IP addressesThis is like level 1 DNS. The system looks herefirst.This can be used to block sites by puttingtheir URL in here
  • 22. /etc/passwdThis is the password file, but it contains more:user name, user password, user ID, group ID,home directory, and shell.It can optionally contain the users “realname”Each user is on its own lineEach user can select the shell they want touse (most use bash these days)
  • 23. /etc/opt/This is a directory for the configuration filesfor each system application you install.Each application gets its own subdirectoryunder /etc/opt/
  • 24. /etc/x11Configuration directory for x11, which is thedisplay system for graphical interfaces inLinuxThis can vary with different distros, so againyou need to check/etc/x11/xorg.conf is the configuration filethat lets you specify the resolutions yourmonitor and graphics card can display, forinstance
  • 25. /homeThis is where the home directories for all ofthe “ordinary” users are located.The exception is root, which has its own homedirectory, /root/Each user gets a directory with their username: e.g. /home/devmixThis can contain configuration files forapplications that are user-specific
  • 26. /home Partition?Your home directory is where youwould place all of your documents, videos,MP3s, etc.It can get fairly largeIt is also the stuff you want to back up, andyou dont want to losePutting it on its own partition, or even its ownphysical drive, is not a bad idea
  • 27. ReinstallingIf you have a separate /home partition, youcan reinstall (or do a clean upgrade) and stillkeep not only your data, but many of your fileconfigurations
  • 28. /libThis is the location for shared library files thatare used by system programsShared library files are equivalent to Windows“*.dll” filesThe files here are intended to be libraries forprograms in /bin and /sbin, i.e. needed toboot the system and run the commands in theroot file system
  • 29. /lib 2Also in this directory are kernel modulesOther library locations for other programsinclude /usr/lib and /usr/local/lib
  • 30. /media, /mntEither directory can be a place to mountremovable media (e.g. CD, USB drive, Floppydisk)/mnt is the older way, and is still used fortemporarily-mounted file systemsMost current distro versions will mount thesedevices automatically
  • 31. /optIntended as a place for “optional” software,i.e. add-on packages that are not part of thedefault installation
  • 32. /procHave we mentioned that everything in Linux isa file or a directory?Any time a process is created in Linux, acorresponding file goes in hereGosh, what would happen if you deleted a filehere?
  • 33. /rootHome directory for the root accountNormally, you dont want to be root, and youdont want to go here
  • 34. /sbinPlace for System binariesOne of three such directories– /sbin– /usr/sbin– /usr/local/sbinAll three hold utilities used for systemadministration, and are intended for the rootuser like for booting, restoring, recovering,and/or repairing the system
  • 35. /tmpGuess what this one is?Yes, temporary files are placed hereAssume that anything in this directory will bedeleted whenever the system is bootedIf you want to have your own temporarydirectory and not lose files at reboot, createone in your home directory, i.e./home/username/temp
  • 36. /usrLots of stuff in hereBack in the mists of prehistory, these werethe user directories, equivalent to what arenow /home directoriesNow /usr is for shareable dataNot intended for software packages, ingeneral
  • 37. /usr/binContains executable files for many LinuxcommandsThese are commands that are not part of thecore Linux operating systemThey would go in /binExamples of commands in here: perl, python
  • 38. /usr/includeGeneral use include files, including headerfiles, for C and C++ programming languages
  • 39. /usr/libContains libraries for the C and C++programming languagesObject files, libraries, and internal files notintended to be executed directly by users orshell scripts
  • 40. /usr/localFor use by System Administrator wheninstalling software locallyMust not be over-written when systemsoftware is updatedGenerally has same subdirectories as /usr
  • 41. /usr/sbinNon-essential standard system binaries, i.e.utilitiesEssential utilities go in /sbin
  • 42. /usr/share/manPrimary location for man pages for the system
  • 43. /usr/srcSource code is placed here, for referencepurposes onlyThis includes the source code for the Linuxkernel
  • 44. /varThis is for files that are expected to beupdated and changedThis includes:– mail directories– print spool– logs– web sites
  • 45. /var 2Because these can be written to constantly,they can grow over timeOn a server, you may want to put /var on itsown partition to limit the growthThis can also prevent the /var directory frombringing down the server by using up all ofthe drive space.
  • 46. /var/lockContains lock filesThese files prevent two users (or twoprograms) from trying to access the samedata at the same timeYou may need to delete a lock file from timeto time
  • 47. /var/logContains the log files generated by programs
  • 48. The end ☺

×