Page 28 - RHEL8 BOOK
P. 28

BASIC COMMANDS – II

          1. To create a new File
          [root@Server ~]# cat > file1
          Hi , Linux students
          Ctrl +z

          2. To see the file contents
          [root@Server ~]# cat file1

          3. To add the contents in a file
          [root@Server ~]# cat >> file1
          It is nice to see you here

          4. To create The Zero file data
          [root@Server ~]# touch f1

          5. To create the multiple zero files data
          [root@Server ~]# touch f1 f2 f3

          6. Creating a single directory
          [root@Server ~]# mkdir dir

          7. Creating multiple directories
          [root@Server ~]# mkdir dir1 dir2 dir3

          8. To create nested directories
          [root@Server ~]# mkdir -p d1/d2/d3/d4

          9. To see the tree structure
          [root@Server ~]# ls -R d1
          [root@Server ~]# tree d1

          10. To make nested directories along with child directories.
          [root@Server ~]# mkdir -p
          India/{Jharkhand/{Ranchi,Jsr},Bihar/{Patna,Gaya}}

          11. To move one level back
          [root@Server Linux13] # cd ..
          [root@Server /] # cd

          12. To move two steps back
          [root@Server Linux13] # cd ../..
          [root@Server /] # cd

          13. Move to the previous working directory (last working directories)
          [root@Server ~] # cd -
          /
          [root@Server /] #




                                                       S. Pradhan
                             (MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
                                             Email Id:-spradhan.iiht@gmail.com
                                                           28
   23   24   25   26   27   28   29   30   31   32   33