BASIC COMMANDS FOR DIRECTORIES IN KALI LINUX

                DIRECTORIES IN  KALI LINUX



     In kali linux, folders are called as directories .There are many directories like /tmp,/root,/home, etc... .




        In this we can know about, how to create a directory, delete  directory ,change directory and types of directories explanation .

BASIC COMANDS:
      
     1) cd    ---> it is used to change directories 
   
             example : cd /home    {it will change the directory to /home}
     
      2) mkdir --->  it is used to create a directory 

             example : mkdir  kali  { this will create a directory in the                                                               name of kali}
  
     3) pwd  ---> it is used to print the working directory 
       
                example ---> pwd { it will print in shell wher we are                                                   working example / or /root or  /home etc ...

    4) mkdir -p ---> it is used to create parent directories which means
                                     it will create a directory inside to another      
                                iteratively how many directory name we                                               mentioned.

                 example : mkdir -p dir1/dir2/dir3/dir4 
                                   this command creates dir1 inside dir2 inside                                          that dir3 and so on ....

you will be clarified on seeing the following pic
      


       rm   ---> it is used to remove an empty directory while the 
                   the directory contains some files or directories it can be                       deleted by rm-r dir name .
         
           example : rm (empty directory name)

       rm-r ---> it is used to remove a directory tat contains some      
                       directory or files

          example: rm-r (directory name)       
                                                             



NOTE: TO CREATE A FILE touch (file name) 
        the commands to delete the file was as same as directories

to open a file nano command was used and we can edit and save in it
 
         eg nano (file name)

     In that there are many options that are listed below when you type for that command in a terminal

Comments

Post a Comment

Popular posts from this blog

DIFFERENCE BETWEEN (apt & apt-get) IN KALI LINUX

KALI LINUX DUAL BOOT ISSUE