UNIX Filenames and Pathnames

Part of the UNIX For Dummies Cheat Sheet

UNIX isn’t alone in being persnickety about creating and finding filenames and pathnames. Keep the following tips in mind as you create and search through UNIX files:

  • Capital and small letters are different in filenames.

  • Filenames can contain letters, numbers, periods, and underscores (_). Stay away from other punctuation. Slashes are special (see below).

  • Filenames shouldn’t contain spaces.

  • The ? wildcard stands for a single character in a filename. The * wildcard stands for a bunch of characters in a filename. An * by itself stands for all files in the working directory.

  • A pathname is the path in which you (or UNIX) can find a file or directory. The root (main) directory of the disk is called /.

  • A pathname consists of directory names separated by slashes (/). If a pathname starts with a slash (/), it begins at the root directory. If a pathname doesn’t start with a slash, it begins at the working directory.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

SERIES
UNIX For Dummies Cheat Sheet

Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.