How to specify the directory path

If the file you want to read is in a subdirectory of the directory that you are in, you can reach the file by typing a relative filename. Relative filenames specify the location of files relative to where you are.
Here are some additional rules that you need to know:
One dot (.) always stands for your current directory.
Two dots (..) specify the parent directory of the directory you are currently in.
All directory paths that include (.) or (..) are relative directory paths.
You can see these files by using the -a option of the  1s (1) command. Without the -a option, the 1s (1) command does not bother to list the . or .. files, or any filename beginning with a period. This may seem strange, but the creators of Unix thought that having some files that were normally hidden kept the directory structure cleaner. Therefore, filenames that are always there (. and ..) and special-purpose files are hidden. The types of files that should be hidden are those that the user normally does not need to see in every listing of the directory structure (files used to tailor applications to the user’s preferences, for example).
Now specify a pathname relative to where you are. For example:
[fidia@veracruz lidial]$pwd
/home/lidia
[lidia@veracruz lidials]$ 1s – 1a . ./ . ./etc/passwd

If the file you want to read is in a subdirectory of the directory that you are in, you can reach the file by typing a relative filename. Relative filenames specify the location of files relative to where you are.

Here are some additional rules that you need to know:

  • One dot (.) always stands for your current directory.
  • Two dots (..) specify the parent directory of the directory you are currently in.
  • All directory paths that include (.) or (..) are relative directory paths.

You can see these files by using the -a option of the  1s (1) command. Without the -a option, the 1s (1) command does not bother to list the . or .. files, or any filename beginning with a period. This may seem strange, but the creators of Unix thought that having some files that were normally hidden kept the directory structure cleaner. Therefore, filenames that are always there (. and ..) and special-purpose files are hidden. The types of files that should be hidden are those that the user normally does not need to see in every listing of the directory structure (files used to tailor applications to the user’s preferences, for example).

Now specify a pathname relative to where you are. For example:

[fidia@veracruz lidial]$pwd

/home/lidia

[lidia@veracruz lidials]$ 1s – 1a . . / . .  /etc/passwd

SEO Engineer

Furnace Prices Winnipeg

Property Tax Assessments to be Mailed Soon

Wpg Auto Dealer

www.adgerlinux.com

Blog Traffic Exchange Related Websites

  • lakefishingFishing Report: July 24th, 2009 Prospects are good for all fish all around, but knowing where to find the right bite is the best way to get the most out of your fishing endeavor. Here is a look at what's biting, and more importantly, where. Lake Fishing: Bass: In the early and late hours you......
  • Taxes Shake UpHow to File Your Taxes for a Recent Graduate This post is part of a three post series which walks a recent graduate through filling out their W-4 and filing their taxes. After these three posts, recent grads should be squared away with Uncle Sam come April. Post 1: How To Fill Out A W-4 For A Recent Graduate......
  • lockwasherLots of Tool Tips Another Nutty Trick Let us say that you need to remove a nut with the use of an open end wrench but the wrench is too large for the nut. When you can do is insert a coin or a washer in between the nut and the wrench. The coin......
  • defragmentationHow to Do a Computer Defragment [/caption]Need help to speed up your computer? You can make your computer perform faster than ever before with a computer defragment.  It can be used to empty the space in your computer which is occupied by unwanted files and folders. This option is stored in your computer all you need......

Tags: , , , , , , , , , , , , , , ,


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply