Basic command for Linux Part 4
10) To copy files and directories
cp - copy files and directories
#cp <source> <destination>
To copy file:
example:
# cp test /root/
# cd /root/
# ll test
-rw-r--r--. 1 root root 0 Jan 23 03:04 test
To copy folders
#cp -r dirtest/ /test/
11) To move directories and files
mv - move (rename) files
DESCRIPTION ;
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
# mv dirtest/ /root/dirtest/
# cd /root/dirtest/
# ll
total 4
drwxr-xr-x. 2 root root 4096 Jan 23 03:08 dirtest
[#
To rename the file or directories :
# mv dirtest test
# ll
total 4
drwxr-xr-x. 2 root root 4096 Jan 23 03:08 test
continue....
10) To copy files and directories
cp - copy files and directories
#cp <source> <destination>
To copy file:
example:
# cp test /root/
# cd /root/
# ll test
-rw-r--r--. 1 root root 0 Jan 23 03:04 test
To copy folders
#cp -r dirtest/ /test/
11) To move directories and files
mv - move (rename) files
DESCRIPTION ;
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
# mv dirtest/ /root/dirtest/
# cd /root/dirtest/
# ll
total 4
drwxr-xr-x. 2 root root 4096 Jan 23 03:08 dirtest
[#
To rename the file or directories :
# mv dirtest test
# ll
total 4
drwxr-xr-x. 2 root root 4096 Jan 23 03:08 test
continue....
No comments:
Post a Comment