Page 172 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 172

Network Operating Systems-I




                    notes          In order not to always have to perform a long listing for seeing the file type, a lot of systems by
                                   default don’t issue just ls, but ls -F, which suffixes file names with one of the characters “/=*|@”
                                   to indicate the file type. To make it extra easy on the beginning user, both the -F and --color
                                   options are usually combined.
                                   As a user, you only need to deal directly with plain files, executable files, directories and links.
                                   The special file types are there for making your system do what you demand from it and are dealt
                                   with by system administrators and programmers.
                                   The first thing that most new users shifting from Windows will find confusing is navigating
                                   the Linux filesystem. The Linux filesystem does things a lot more differently than the Windows
                                   filesystem.
                                   Everything starts from the root directory, represented by ‘/’, and then expands into sub-directories.
                                   Where DOS/Windows had various partitions and then directories under those partitions, Linux
                                   places all the partitions under the root directory by ‘mounting’ them under specific directories.
                                   Closest to root under Windows would be c:.

                                   Under Windows, the various partitions are detected at boot and assigned a drive letter. Under
                                   Linux, unless you mount a partition or a device, the system does not know of the existence of
                                   that partition or device. This might not seem to be the easiest way to provide access to your
                                   partitions or devices but it offers great flexibility. Most files are just files, called regular files; they
                                   contain normal data, for example text files, executable files or programs, input for or output from
                                   a program and so on.
                                   This kind of layout, known as the unified filesystem, does offer several advantages over the
                                   approach that Windows uses. Let’s take the example of the /usr directory. This directory off the
                                   root directory contains most of the system executables. With the Linux filesystem, you can choose
                                   to mount it off another partition or even off another machine over the network. The underlying
                                   system will not know the difference because /usr appears to be a local directory that is part of
                                   the local directory structure. How many times have you wished to move around executables and
                                   data under Windows, only to run into registry and system errors? Try moving c:windowssystem
                                   to another partition or drive.



                                     Did u know?  What is named pipes?
                                   Another point likely to confuse newbies is the use of the frontslash ‘/’ instead of the backslash
                                   ‘’ as in DOS/Windows. So c:windowssystem would be /c/windows/system. Well, Linux is not
                                   going against convention here.
                                   Unix has been around a lot longer than Windows and was the standard a lot before Windows was.
                                   Rather, DOS took the different path, using ‘/’ for command-line options and ‘’ as the directory
                                   separator.
                                   To liven up matters even more, Linux also chooses to be case sensitive. What this means that
                                   the case, whether in capitals or not, of the characters becomes very important. So this is not the
                                   same as THIS or ThIs for that matter. This one feature probably causes the most problems for
                                   newbies.
                                   We now move on to the layout or the directory structure of the Linux filesystem. Given below is
                                   the result of a ‘ls -p’ in the root directory.

                                   bin/ dev/ home/ lost+found/ proc/ sbin/ usr/
                                   boot/ etc/ lib/ mnt/ root/ tmp/ var/
                                   /sbin - This directory contains all the binaries that are essential to the working of the system.






          166                              LoveLy professionaL university
   167   168   169   170   171   172   173   174   175   176   177