home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Complete Idiot's Guide to Linux
(Publisher: Macmillan Computer Publishing)
Author(s): Manuel Ricart
ISBN: 078971826x
Publication Date: 12/22/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Chapter 3
Navigating through the File System

In This Chapter

  Introducing the Linux file system
  The file system as viewed with KFM
  Opening files and folders
  Introducing file permissions

The computer keeps and organizes information in files and folders. A file can be a chapter for your best-selling novel or an image scan of your favorite place on earth. A file can also be a program or application used to create other files. A folder can contain other folders and files, which in turn can contain more folders and files, nested as many levels as you want.

The files and folders in your computer make up the file system. At the very top of your computer’s file system is a root folder that contains all files and directories stored in your computer.

Each file and folder in your computer has a name that identifies its contents. For example, a folder containing your email files might aptly be named “Mail.” A file containing your to-do list might be called “todo.”

Filenames in Linux can be up to 256 characters in length. They can contain numbers and uppercase and lowercase letters. You can use most characters; however, there are some that you should avoid. Characters such as the asterisk (*), question mark (?), ampersand (&), vertical bar (|), circumflex (^), quote (), and apostrophe () should never be used, as these characters are special to the shell. Characters such as dash (-) and spaces should not be used because they will be hard to work with and delete through a shell. (The dash is used to specify program arguments. Some tools will get confused when the name of a file begins with a dash, because they will think that you are specifying arguments instead of a filename.) The space will make the shell think that you are specifying two different files. (Surround it with quotes to access it from a shell.) You should avoid these characters even if you only intend to work through KDE or another graphical environment.

In addition to their descriptive name, files and folders have a pathname that identifies their location in the file system. The pathname lists all the folders, starting at the root, that you must traverse to reach the file. All names in the file path are separated by a slash (/). A slash at the beginning of the pathname represents the root folder.


This is Linux’s hierarchical file system.

Everything you do under Linux will require that you interact with the file system. Under Linux there are two ways you can access your files:

  Through a graphical environment like KDE
  Through a shell or command prompt

This section focuses on using the graphic tool K File Manager (KFM), which is part of the KDE environment. Other X environments provide their own tools or, as a last resort, xfm (The X File Manager).

The File System Through KFM

KFM is the file manager for KDE. KFM provides network-transparent file access. This term means that if your computer is connected to a network, you can use the graphical interface to access resources stored in other computers using standard internet protocols such as FTP (File Transfer Protocol) or HTTP (Hypertext Transfer Protocol, the protocol used by the Web). This functionality is very powerful, as it allows you to browse information located on your disk or on a computer in China with equal ease.


Check This Out:  
Accessing files through a shell is covered in detail in Chapter 11, “Shells and Consoles.”

In KFM, icons represent files and folders. Uniform Resource Locators (URLs) represent file paths. An URL is like a file path on steroids: It specifies the location of a file (a resource) that you can access using various protocols. URLs typically provide

  The protocol (how to access the resource)
  A machine name (the machine storing the resource)
  The path to the resource

Unless you’ve been away from civilization during the past few years, you have heard about the Internet—and probably are familiar with Internet addresses such as http://www.aol.com or http://www.yahoo.com. These addresses are URLs.

File URLs look similar to HTTP URLs: file:/home/alberto. One obvious difference is that the protocol used is called file instead of http. The file protocol specifies a file in a local computer, your computer. The other difference is that there’s only one slash after the colon instead of the two you might have seen or used while accessing the Web.

A KFM window provides you with menus, a tool bar with navigation tools, a location field where you enter file paths and URLs, and a status area for messages and additional information about a file.

Typically you open a KFM window by clicking the home button on the panel. Other features of the KFM window include:

  Toolbar — Provides you with shortcuts to move around in the file system and for manipulating files.
  Location field — Specifies the URL you are browsing.
  Status area — Displays information about files and file selections. (at the bottom on the window)
  Home button (KFM) — Click this button to create a file viewer window.


The root directory as displayed by KFM looks like this. Note the additional information displayed in the status area for the vmlinuz file.

The KFM Navigation Toolbar

The KFM toolbar provides you with convenient buttons for moving between directories and manipulating files:

  The Up button will move you one folder up from your current location.
  The Back button will move you to your previous location. If you have entered directories in the location bar, the back button will move you in reverse order of your navigation history.
  The Forward button will move forward in your navigation history. (You must have used the back button for this one to be enabled.)
  The Home button will take you to your home directory.
  The Refresh button will reload the directory and make any changes you have made visible.
  The Copy and Paste buttons are explained in Chapter 6, “Organizing Your Files.”
  The Help button opens up the help program with information about KDE.
  The Task button is animated when a lengthy task is taking place. If you click it, you can create a new KFM window.


KFM’s toolbar provides various buttons to assist you in navigating the file system.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.