Page 165 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 165

Operating System Tools




                    Notes          5.   ...................................... is a special file system which doesn’t exist on a device, but is a sort of
                                       gateway to the Linux kernel.
                                   6.   ...................................... is a pseudo file system which contains device files used for terminal
                                       emulation.
                                   7.   A SATA disk driver internally uses the ...................................... layer to represent and access
                                       data.
                                   8.   If you ever need to remove a medium from the file system, use the......................................
                                       command.
                                   9.   The ...................................... file system  is the parent of the entire file system.

                                   9.3 File Search Utilities

                                   Mostly,  the  file  you  want  to  locate  is  inside  your  home  directory.  However,  sometimes  you
                                   want to locate a particular file somewhere on your whole system. Fortunately, there are a few
                                   commands at your disposal to do so.

                                   9.3.1 Locate Command

                                   This  command  is  used  to  manage  and  use  a  database  of  files.  This  will  assist  you  to  find  a
                                   particular file. Before using this command, you first need to install it (the package is called sys-
                                   apps/mlocate) and then create the file database. Also, this database is not automatically brought
                                   up to date while you modify your system, so you’ll need to run this command (which is the same
                                   for creating a new database or updating an existing one) every now and then:

                                   # updated
                                   We can keep this database up to date by using the system scheduler (known as cron). When your
                                   database is build and somewhat up to date, you can locate any particular file on your filesystem
                                   using locate.


                                          Example:
                                   # locate make.conf
                                   /etc/portage/make.conf
                                   (...)
                                   /usr/portage/local/layman/make.conf
                                   It can be seen that the locate command returns all files it has found where the string (in this case,
                                   “make.conf”) is used in the filename, even when the file name is different.




                                      Notes  The name mlocate is the name of the project that maintains the package. In earlier
                                     days, the package of choice for the locate functionality was slocate.


                                   9.3.2 Find Command

                                   This  command  is  considered  as  a  very  significant  and  powerful  command  which,  unlike
                                   locate,. only returns live information.  Thus,  a database is  not used.  This  makes  searches
                                   with find somewhat slow, but find’s power isn’t speed, but the options you can give to find a
                                   particular file.




          158                              LOVELY PROFESSIONAL UNIVERSITY
   160   161   162   163   164   165   166   167   168   169   170