Linux commands to copy and move the files
mv command to rename a file
kodingwindow@kw:~$ ls a.out kw.cpp kw.py Documents Fedora.txt Pictures Templates Videos kw.c KW.java Desktop Downloads Music Public Ubuntu.txt Weekdays
kodingwindow@kw:~$ mv Fedora.txt FEDORA.TXT kodingwindow@kw:~$ ls a.out kw.cpp kw.py Documents FEDORA.TXT Pictures Templates Videos kw.c KW.java Desktop Downloads Music Public Ubuntu.txt Weekdays
cp command to copy a file
kodingwindow@kw:~$ cp FEDORA.TXT /home/kodingwindow/Documents/ kodingwindow@kw:~$ ls $cat /home/kodingwindow/Documents/ FEDORA.TXT
cp and mv commands to copy and move the files
kodingwindow@kw:~$ mkdir Linux kodingwindow@kw:~$ touch Ubuntu.txt Fedora.txt kodingwindow@kw:~$ cp Ubuntu.txt Fedora.txt kodingwindow@kw:~$ ls a.out KW.java Documents Linux Public Videos kw.c kw.py Downloads Music Templates Weekdays kw.cpp Desktop Fedora.txt Pictures Ubuntu.txt kodingwindow@kw:~$ cp Ubuntu.txt /home/kodingwindow/Linux/ kodingwindow@kw:~$ ls $cat /home/kodingwindow/Linux/ Ubuntu.txt kodingwindow@kw:~$ mv Fedora.txt /home/kodingwindow/Linux/ kodingwindow@kw:~$ ls $cat /home/kodingwindow/Linux/ Fedora.txt Ubuntu.txt kodingwindow@kw:~$ ls a.out kw.cpp kw.py Documents Linux Pictures Templates Videos kw.c KW.java Desktop Downloads Music Public Ubuntu.txt Weekdays kodingwindow@kw:~$ cd Linux/ kodingwindow@kw:~/Linux$ ls Fedora.txt Ubuntu.txt
Comments and Reactions
What Next?
Linux commands for date and time
Linux commands to view the history and file content
Linux commands to change the text cases and number systems
Advertisement