Hi,
This post will give you the clear idea how to navigate and create within the directories in Command prompt. This will help you to identify the directory location and you can easily understand the UNIX environment also. For the practice purpose I am going to show every folder(directory) creation with in the command prompt only.
To Start command prompt
1.Go to start->run-> and then type cmd or command (You can use WIN+R to get run directly)
2.Command window is opened with the current user. like below
C:\Users\SK>
Where C - > is root directory
Users - > Folder which all the users are existing
SK - > I am the user(It will differ from system to system)
Considering the example 1 (Navigation with in Directories)
C:\Users\SK >
1. Now we are under C drive USERS folder under sub folder called SK
2. To go to the USERS directory use CD.. Then you are now C:\Users path

3. To enter into the directory (Here sub folder ) SK use CD SK ( To see the list of directories use DIR command)

4. To directly go to the root directory use CD\

5. To directly go to the folder SK use CD C:\Users\SK

Considering the example 2 (Creation of Directories)
Here is the total tree structure of our folder creation.
1. There is a directory Xtraengineer which is under C drive
2. There are 3 directorys present with name Dir1, Dir2 and Dir 3 under Xtraenginner
3. There is a sub directory named SubDir1 which is present under Dir1.
Here we will try to create the same directory structure.
1. Go to the C:\>
2. User command mkdir FolderName (C:\>mkdir XtRaEnGiNeEr). Folder is created with name XtRaEnGiNeEr ( You can cross check with dir cmd)

3. Use CD FolderName to enter into that Folder(C:\>CD XtRaEnGiNeEr Next you will be under C:\XtRaEnGiNeEr>)
4. Here we will execute the following 3 commands.
C:\XtRaEnGiNeEr>mkdir Dir1
C:\XtRaEnGiNeEr>mkdir Dir2
C:\XtRaEnGiNeEr>mkdir Dir3

Then use DIR to check the directories present under XtRaEnGiNeEr

5. Use CD Dir1 to enter into the directory named Dir1
C:\XtRaEnGiNeEr>CD Dir1
C:\XtRaEnGiNeEr\Dir1>
6. Now use mkdir SubDir1 to create sub directory under Dir1 folder
C:\XtRaEnGiNeEr\Dir1>mkdir SubDir1

7. Use tree command to display the folder hierarchy.

No comments:
Post a Comment