/ .. home tmp etc working directory = . max ../zach bin notes bin/log report log zach hls notes in .NET Embed ean13+5 in .NET / .. home tmp etc working directory = . max ../zach bin notes bin/log report log zach hls notes

How to generate, print barcode using .NET, Java sdk library control with example project source code free download:
/ .. home tmp etc working directory = . max ../zach bin notes bin/log report log zach hls notes generate, create ean13 none with .net projects Microsoft Word Figure 6-6. Relative pathnames 208 6 The Linux Filesystem home names temp literature demo promo Figure 6-7. The file structure developed in the examples mkdir: Creates a Directory The mkdir ut EAN-13 Supplement 2 for .NET ility creates a directory. The argument (page 1135) to mkdir becomes the pathname of the new directory.

The following examples develop the directory structure shown in Figure 6-7. In the figure, the directories that are added appear in a lighter shade than the others and are connected by dashes. In Figure 6-8, pwd shows that Max is working in his home directory (/home/max) and ls shows the names of the files in his home directory: demo, names, and temp.

Using mkdir, Max creates a directory named literature as a child of his home directory. He uses a relative pathname (a simple filename) because he wants the literature directory to be a child of the working directory. Max could have used an absolute pathname to create the same directory: mkdir /home/max/literature.

The second ls in Figure 6-8 verifies the presence of the new directory. The F option to ls displays a slash after the name of each directory and an asterisk after each executable file (shell script, utility, or application). When you call it with an argument.

$ pwd /home/ max $ ls demo names temp $ mkdir literature $ ls demo literature names temp $ ls -F demo literature/ names temp $ ls literature $. Figure 6-8. The mkdir utility Working with Directories 209 that is the name of a directory, ls lists the contents of that directory. The final ls does not display anything because there are no files in the literature directory. The following commands show two ways to create the promo directory as a child of the newly created literature directory.

The first way checks that /home/max is the working directory and uses a relative pathname:. $ pwd /home/max $ mkdir literature/promo The second w ay uses an absolute pathname:. $ mkdir /home/max/literature/promo Use the p ( parents) option to mkdir to create both the literature and promo directories with one command:. $ pwd /home/max $ ls demo names temp $ mkdir -p literature/promo $ mkdir -p /home/max/literature/promo cd: Changes to Another Working Directory The cd (chan ge directory) utility makes another directory the working directory but does not change the contents of the working directory. Figure 6-9 shows two ways to make the /home/max/literature directory the working directory, as verified by pwd. First Max uses cd with an absolute pathname to make literature his working directory it does not matter which is the working directory when you give a command with an absolute pathname.

A pwd command confirms the change made by Max. When used without an argument, cd makes your home directory the working directory, as it was when you logged in. The second cd command in Figure 6-9 does not have an argument so it.

$ cd /home/m .net vs 2010 EAN13 ax/literature $ pwd /home/max/literature $ cd $ pwd /home/max $ cd literature $ pwd /home/max/literature. Figure 6-9. cd changes the working directory 210 6 The Linux Filesystem makes Max s Visual Studio .NET EAN/UCC-13 home directory the working directory. Finally, knowing that he is working in his home directory, Max uses a simple filename to make the literature directory his working directory (cd literature) and confirms the change using pwd.

. The working directory versus your home directory tip The working directory is not the same as your home directory. Your home directory remains the. same for the ean13+2 for .NET duration of your session and usually from session to session. Immediately after you log in, you are always working in the same directory: your home directory.

Unlike your home directory, the working directory can change as often as you like. You have no set working directory, which explains why some people refer to it as the current directory. When you log in and until you change directories using cd, your home directory is the working directory.

If you were to change directories to Sam s home directory, then Sam s home directory would be the working directory.. The . and .. Directory Entries The mkdir ut .NET EAN13 ility automatically puts two entries in each directory it creates: a single period (.) and a double period (.

.). The .

is synonymous with the pathname of the working directory and can be used in its place; the .. is synonymous with the pathname of the parent of the working directory.

These entries are hidden because their filenames begin with a period. With the literature directory as the working directory, the following example uses ..

three times: first to list the contents of the parent directory (/home/max), second to copy the memoA file to the parent directory, and third to list the contents of the parent directory again..
Copyright © . All rights reserved.