220 CHAPTER 14 UNDERSTANDING LINUX FILES AND (My space web page)

220 CHAPTER 14 UNDERSTANDING LINUX FILES AND USERS Figure 14-1. Hardware devices under Linux are accessed as if they were files and can be found in the /dev folder. Here s another example. Say you re working in an office and you want to connect to a central file server. To do this under Linux, you must mount the files that the server offers, making it a part of the Ubuntu file system. Doing this involves creating an empty directory (or using one that already exists) and using the mount command at the BASH shell to make the server s contents magically appear whenever that directory is accessed. We ll discuss how this is done later in this chapter, in the Mounting section (but remember that Ubuntu may do this automatically, as discussed in Chapter 12). Once the network server is mounted, it is treated exactly like a directory on your hard disk. You can copy files to and from it, just as you would normally, using the same tools as you use for dealing with any other files. In fact, less knowledgeable users won t even be aware that they re accessing something that isn t located on their PC s hard disk (or, technically speaking, within their Ubuntu partition and file system). By treating everything as a file, Linux makes system administration easier. To probe and test your hardware, for example, you can use the same tools you use to manipulate files. So how do you know which files are real and which are virtual? One method is to use the following command, which was introduced in the previous chapter: ls -l

Leave a Reply