Linux Classes
Linux Classes
Share This With a Friend
LINUX CLASSES - FILES

Can You Explain Linux Directory Terminology?

Directory Lingo

To navigate your Linux file system, there are several terms you should understand.

Current directory The directory you are in at a given time, sometimes called the current working directory. The pwd (print working directory) command will tell you the name of the current directory. Subdirectory A directory within the current directory.

Parent directory The directory above the current one. Every directory except the top level has a parent. If you are in the /usr/spool directory, then /usr is the parent.

Home directory A user's personal directory. For example, if your user name is hermie, your home directory is /home/hermie. The user normally has complete control over all files stored in directories beneath the home directory. Exception: If the root user copies a file to your home directory, root still owns and controls that file.

Root directory The top of the file system, denoted by a slash. Only subdirectories appear below this directory. Don't confuse this with /root, the home directory for the root user. When speaking, always refer to / as "the root directory" and to /root as "slash root."

Absolute file name A file name that is valid no matter where you are in the file hierarchy. In practice, this means it must start with a slash and specify the full path to the file. For example, /home/hermie/recipes/sludge_fudge is an absolute file name, but sludge_fudge is not.

Relative file name A file name that specifies a file relative to the current directory. For example, if you were in hermie's home directory, /home/hermie/, you would reference that healthy fudge recipe as recipes/sludge_fudge.

Previous Lesson: Linux Directories
Next Lesson: Navigating the File System

[ RETURN TO INDEX ]



Comments - most recent first
(Please feel free to answer questions posted by others!)

bob smith (20 Feb 2013, 13:04)
Why does cd /.. not produce a "not found" error? Is there any documentation explaining this decision? Works the same on unix and windows.
Pete (28 Aug 2011, 00:06)
@aqid

/ is used to represent the root directory.
~ is used to represent your home directory
tarun (29 Jun 2011, 14:22)
hello sir thanks for this information.. kindly tell me the basics in details of directories..
aqid (06 Oct 2010, 05:47)
which symbol is used to represent the root directory???
Bob Rankin (21 Aug 2010, 17:38)
@ganesh - No difference.
ganesh (19 Aug 2010, 07:19)
What is the difference between /home and /home/
hpal (20 May 2010, 22:15)
Guys you don't have to be confused on the destination of your directory you will be, when using (.) or (..)

(.) Simply denotes the current folder/directory
(..) Simply denotes the parent directory
/ When use without . or .. as prefix. It means root directory or folder

As explained on other section on this site, each folder represents a branch of a tree, and the root itself is the tree.

Files are treated as leaves.

That is why using multiple combination of ../ will move back to the each parent, depending on the number of times being called. And if using cd ../ with no parent will always go to the root.


Kurt (22 Mar 2010, 21:23)
cd../.. gives an error message
cd ../.. moves back two places to home
cd ../../.. moves back three places
cd ../../../.. still only moves back three places because we can't go back any further
J (09 Mar 2010, 12:45)
No.....I think that now the directory should be home/jvale04922.
Bob Rankin (02 Mar 2010, 05:19)
A trick question! You're still in the same directory. Do you know why?
joey (01 Mar 2010, 09:22)
if my current directory is: $ pwd home/jvale04922/irm230 and i excecute the command $ cd../.. What directory am i in now?

I welcome your comments. However... I am puzzled by many people who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn all you can, ask questions if you like. But don't ask me to send what you already have. :-)

NO SPAM! If you post garbage, it will be deleted, and you will be banned.
*Name:
Email:
Notify me about new comments on this page
Hide my email
*Text:




Copyright © by - Privacy Policy
All rights reserved - Redistribution is allowed only with permission.

Popular Linux Topics

Linux Intro
Linux Files
Linux Commands
Change Password
Copy Files
Linux Shell Basics

Linux Tutorial

Who is Doctor Bob?
What is Linux?
History of Unix
Operating Systems
What's Next?

Linux Basics

Living in a Shell
Root and Other Users
Virtual Consoles
Logoff and Shutdown
Choosing a Shell
The Command Prompt
Wildcards
Command History
Aliases
Redirection
Pipelines
Processes
Stopping a Program
Environment Variables
Help!

Linux Files

The Linux File System
Linux File Names
Linux Directories
Directory Terminology
Navigating the File System
Listing Linux Files
Displaying Linux Files
Copying and Renaming Files
Creating Files and Directories
Deleting Files and Directories
Linux Files - Wildcards
The Nine Deadly Keystrokes
Linux File Permissions
Changing File Permissions

Linux Commands

Important Linux Commands
Changing Your Password
Switching Users
Who is Logged In?
Date and Time
The Echo Command
Spell Checking
Printing Linux Files
Joining Files
Searching for Files
Comparing Files
Task Scheduling
Linking Files

Linux Editors

The Vi Editor
The Emacs Editor
The Pico Editor

Linux Data Manipulation

Slicing & Dicing
Heads or Tails?
Sorting Data
Eliminating Duplicates
Selecting Columns
Selecting Records
Search & Replace
Crunching Data
Finding Files
Pipe Fitting

Linux Shell Programming

Linux Shell Scripts
Executing a Script
Shell Script Variables
Shell Script Logic
Shell Script Looping
Shell Script Debugging

Perl Programming

Perl Basics
Perl Variables
Perl Arguments
Perl Logic
Perl Looping
Perl and Files
Perl Pattern Matching

Linux and Email

Sending Email
Reading Email
Other Mail Commands
Using Pine for Email
The Pine Inbox
Pine Email Basics
Pine Email Folders
Pine for Power Users

Compression and Encoding

Linux File Compression
Archiving With Tar
Compression With Gzip
Compress and Zcat
Zmore and Zless
Zip and Unzip
Encoding and Decoding
Encryption

Linux Does DOS

Accesing DOS Files
Accesing DOS Partitions
Running DOS Programs

Managing Linux

Updating Your Linux System
Installing Packages with RPM
Uninstalling Packages w/ RPM
Upgrading Packages with RPM
Querying Packages with RPM

AltStyle によって変換されたページ (->オリジナル) /