x
Loading
 Loading
Hello, Guest | Login | Register

Filenames by Design, Part One

Learn to take full advantage of your filesystem with tips and tricks for the newbie and old pro alike.

When you look at the menus and buttons of graphical applications, you can’t see one of the great strengths of Linux systems: using the names of files and directories as a simple kind of database. Shells and utilities can add another dimension to this organization scheme.

This article isn’t only for command line users. These techniques work for graphical applications, too. For instance, you might set up the files with the quick command-line tools, then access the files from the GUI app. (The next two columns will have details.)

Linux filesystems in brief

This section has four basic points to bring everyone up to speed on filesystems. (The second point, about pathnames, is worth reviewing.)

  1. Files’ names are contained in directories — which are actually files themselves. A directory is an (unsorted) list of filenames and meta-information. There are two main ways to list the files in a directory:
    • Utilities like ls (which has some surprisingly powerful features) and find read directories, then analyze and output information from them.
    • Shell wildcard operators like * and [x-y] read directories and output sorted lists of matching filenames.
  2. The filesystem is an (inverted) tree of directories and other entries. The top entry is the root directory, which is named simply /. To locate a filesystem entry, you give its pathname. There are two kinds of pathnames:
Follow Linux Magazine
Rackspace