Page 29 - RHEL8 BOOK
P. 29

14. To copy Files
          [root@Server ~] # cp Source Destination

          15. To copy folders/Directories
          [root@Server ~] # cp -r source dest

          16. To rename directories and files
          [root@Server ~] # mv dir1 dir2

          17. To remove the file or directory.
          [root@Server ~] # rm <file name>
          [root@Server ~] # rm sun

          18. To remove the file or directory.
          [root@Server ~] # rm –f <file/dir name>
          [root@Server ~] # rm –f sun

          19. To remove the empty directory.
          [root@Server ~] # rmdir <dir name>
          [root@Server ~] # rmdir dir1

          20. To remove the directory with confirmation.
          [root@Server ~] # rm –r < dir name>
          [root@Server ~] # rm –r dir2

          21. To remove the directory with forcefully
          [root@Server ~] # rm –rf < dir name>
          [root@Server ~] # rm –rf dir2

          22. To view and change the date and time
          [root@Server ~] # date
          [root@Server ~] # date –s “wed sept 20 21:10:55 ist 2016”

          23. To view the calendar for complete year in screen order
          [root@Server ~] # cal 2016 | less
          [root@Server ~] # cal 2016 | more

          24. To get help on a particular command with man
          [root@Server ~] # man mkdir
          (Note: use q option to quit from man page)

          25. To find the location of an object
          [root@Server ~] # find / -iname anaconda-ks.cfg

          26. To counts words, lines and character of file.
          [root@Server ~] # wc anocanda-fs.cfg






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