A file manager is, at heart, merely a graphical way to organize and view your files. Not a lot of innovations can be made in moving files and folders around. With that in mind, you will probably feel right at home in the Linux file managers if you have used Windows or Mac OS. In most computer operating systems, all the data is arranged in a hierarchy of folders (directories) and files. Of course, your data is organized this way because we are all familiar with folders and documents in the physical world. The Linux File SystemEach operating system has its own folder, or directory, hierarchy. You might be familiar with a few of the top-level folders in Windows, such as Program Files. Linux is not so palpable in its naming of the top-level directories. Most of those directories at the top level are ones that you will notand usually should nothave to get into. If you are curious, many pages online (such as the one at http://www.freeos.com/articles/3102/) give lengthy explanations of the purpose of each top-level directory. You might not want to change anything in the /etc directory or the /var directory, but there are a few files and locations in the Linux file system that are useful to know about. You can sort of mentally bookmark these for reference. /etcThis is a directory that you shouldn't muck around in unless you know what you're doing, but /etc is a good directory to know about. This is where the most important configuration files for Linux are kept. In extreme problem situations, the fix can be in here. However, unless you think of yourself as something close to an advanced user and have a reason to be there, consider this directory forbidden. Here, I will say it in German, so it sounds more forbidding: Verboten!
/home/[username]This is where you live. /home has directories for each of the users on your computer (except the root user). Your home directory is readable only by you and the root user. You can do whatever you want in here. Preference files for many of the programs that you run are also stored here in hidden folders. /mntIf you mount another file system or external storage media, such as your Windows disk partition, a floppy disk, or a CD, /mnt is a good place to look for those files. /mnt is the usual place where your OS will give you access to mounted file systems. /miscCan't find the file system that you mounted in /mnt? Look in /misc. This is the directory that Fedora sometimes uses to mount file systems to. /rootYou have a home, and so does the root user. But the root user is too good to live in the /home neighborhood where you live. If you run any programs as the root user, most of the preference files will be in here. You shouldn't have to play around in the /root directory much. /tmp/tmp means "temporary." This is a handy directory for placing temporary files, especially files that you need to hand off to another user on the computer. You will see some mystery files in the /tmp directory because programs also use the /tmp directory to keep temporary files. Don't bother cleaning it out; Linux can tidy up after itself. /usr/binThis directory is on your verboten list of directories not to change things in, but it's a great place to know about when you are looking for programs. /usr/bin is where most of your executable program files are stored. Want to run the command to start a program? This is where Linux finds the command. /usr/shareThe root user owns this directory, but it contains many files that all users share, thus the name. For example, /usr/share/pixmaps is where you will usually find desktop wallpaper and icon files. Owners and PermissionsFiles and directories have ownership and permissions in Linux. These settings determine whether you are allowed to read, write, or execute that object (in the case of programs and scripts). Ownership and permissions are strict. You can't perform a hostile takeover to become the owner of a file. You can't talk your way into reading any file or folder that you are not allowed to read. Ownership is shown by username. Either letters or numbers represent the permissions for a file or folder. The letters and numbers stand for the three aspects of permission: read, write, and execute. Table 2.3 shows the text and number codes for permissions.
You can see the permission for an object by right-clicking the file or folder in your file manager and looking at the Permissions tab (shown in Figure 2.10). You should see a section for the permissions with check boxes and a section showing the ownership. Permissions are listed in the order of the permissions for the object's owner, the permissions for members of the group the object belongs to, and permissions for everyone. If you have read and write permissions to the file, you can change some of the permissions for the file. If you are the owner of the file, you can pretty much do whatever you want with that file. Figure 2.10. File permissions listed in the Nautilus file manager.You can also see permissions listed in your terminal from the command line. We talk more about the terminal in a bit. You usually don't have to worry about whether you have permissions for a file. Occasionally, however, knowing how to check the permissions can save you a good amount of troubleshooting time. For instance, if you find yourself unable to delete a file or to move a file, check the permissions. If you cannot save changes to a file, check the permissions. Permissions will become more prohibitive when you have to work with files that are outside your home directory. Konqueror
In KDE Konqueror is your right-hand .man? woman? window? Anyway, Konqueror is a program you will find yourself using a lot (see Figure 2.11). It's a file manager, a Web browser, and more. Konqueror is your assistant to use when you need to look at your files or copy, move, or delete files. Figure 2.11. Konqueror as a file manager.Konqueror isn't all that different from file managers you might have used in Windows or Mac OS. When you open the program as a file manager, you see a menu bar, a tool bar, an address bar, and two panels below those. The menu contains options for working with files and folders, changing locations, bookmarking locations to go to later, and changing the program's settings. To get familiar with the program, go to Settings > Configure Konqueror, and play with the preferences. The toolbar and address bar in Konqueror have the one-click convenience to perform most of the frequently used functions in the program. The arrow buttons let you move up a directory, back to the directory you were just in, or forward again. The toolbar button with the little house icon is your Home; use this button to go to /home[username], your home directory. The other buttons include a Refresh button for renewing your view of the folder, in case something changed; editing buttons for Copy, Cut, and Paste; and a few buttons for changing the view. In the address bar, you can type in the path of any directory you want to go to and then press Enter. Files and directories in Konqueror are represented by icons to look like documents and folders. You can usually tell the type of documentwhether it is a text document, an audio file, a picture, and so onby the icon Konqueror uses to show the file. You can right-click any file or folder to see the properties for that object, including permissions, the type of file, and the date that the file was last changed. Having all this information readily available makes managing your files easy.
Konqueror is a powerful program with many more capabilities than the simple file management we have talked about. This will get you started. Next, you should look through all the menus and poke at everything to see what it does. With Linux, your regular username will be prevented from doing any real damage because that username won't have permissions to hurt the system files. You can also look at the aesthetic customizations you can do to Konqueror in Topic 4. Nautilus
File managers in the most popular operating systems currently do not differ a lot in form and function. If you know how to navigate through one file manager, it won't take you long to learn to use another file manager. Nautilus is certainly in this group of similar file manager programs that merely have a different flavor and different accessories. While you use GNOME, Nautilus is your center, the program that is your gateway to accessing other programs and working with your data. Again, as in most file manager programs, files and directories are displayed as documents with associated icons and folders. You can right-click any file or folder to view details about that object or to change permissions. When you double-click a file, either you see a preview of the file's contents or a program opens. Nautilus can display images and text documents, or Nautilus can open files, by type, in default programs. Nautilus adds a twist to the traditional file manager layout by having two modes in which you can view your files: browser mode and spatial mode. The browser mode of Nautilus looks like a traditional file manager. The spatial mode doesn't look too much different, except that everything in the Nautilus layout is pared to the basics. Nautilus in Browser ModeThe browser mode of Nautilus (see Figure 2.13) is named as such because you can browse your files in a single window. Click on any folder, use the Up button on the toolbar, or double-click a file to preview the contents. All those actions happen in the same Nautilus window. You can think of it as browsing a book or magazine page by page. Figure 2.13. Nautilus using the Browse File System option in the main menu.The layout of Nautilus in browser mode is a simple one, with a menu, toolbar, address bar, a left-side detail and navigation pane, and a right-side view pane. The menu bar and toolbar are easy to understand, with the menus containing basic options and the toolbar consisting of large, labeled icons. The Location bar is an address bar into which you can type any file location. Unlike Konqueror, Nautilus does not advertise itself as a Web browser as well as a file manager, but you can type Web addresses into the location bar. By default, Nautilus shows you the source code of the Web page you visit. You can change this behavior, but you are better off opening a Web browser. The left-side panel shows details about a highlighted file or folder, such as date and file type. You can use the Information drop-down list to choose other views for the left-side pane, including a tree navigation view. The main view pane on the right displays the contents of the folder you are in or the preview of a file's contents. Nautilus in Spatial ModeThe spatial mode of Nautilus (see Figure 2.14) keeps everything separate in its own place, or space. This is the Nautilus way of displaying file management in an object-oriented way. If the phrase "object oriented" means nothing to you, don't worry; it means a lot to programmer types. What the spatial mode in Nautilus means for everyone is that every folder opens in a separate window. Every file system, every device, and every folder is given its own space. Figure 2.14. Nautilus as a spatial file manger accessible from the desktop home icon.There are still lingering arguments in the Linux community as to whether spatial file management is a good thing. Some users maintain that they just don't want all of those extra windows. Advocates argue that spatial file management is more intuitive for users, helps new users learn the Linux file system faster, and makes dragging and dropping files more convenient. The GNOME developers have made the new spatial experience more user friendly with certain details to help you know where you are in the file system:
Nautilus has traditionally played catch-up to Konqueror. KDE zealots have touted Konqueror as the innovative leader of Linux file managers for years. With spatial file management and new uses for the Nautilus file manager beyond simple file tasks, Nautilus is becoming an innovator as well. If the spatial file management seems odd to you, try it for a while. Switch between spatial mode and browser mode in Nautilus until you find the best fit for how you think and how you work.
|