Simple Copy Command in Linux :
[ivreddy@localhost practice]$ mkdir test
[ivreddy@localhost practice]$ ls
sample1.txt test test1 test1.txt testfolder.rar
[ivreddy@localhost practice]$ cp sample1.txt test1.txt test
[ivreddy@localhost practice]$ cd test
[ivreddy@localhost test]$ ls
sample1.txt test1.txt
[ivreddy@localhost test]$ cp test1.txt test2.txt
[ivreddy@localhost test]$ ls
sample1.txt test1.txt test2.txt
Copy with Recursive and Force in Linux:
[ivreddy@localhost practice]$ cp -rf test test2
[ivreddy@localhost practice]$ ls
sample1.txt test test1 test1.txt test2 testfolder.rar
[ivreddy@localhost practice]$ cd test2
[ivreddy@localhost test2]$ ls
sample1.txt test1.txt test2.txt
Remove with Recursive and Force in Linux
[ivreddy@localhost practice]$ ls
sample1.txt test test1 test1.txt test2 test3 testfolder.rar
[ivreddy@localhost practice]$ rm test1.txt sample1.txt
[ivreddy@localhost practice]$ ls
test test1 test2 test3 testfolder.rar
[ivreddy@localhost practice]$ rm -rf test3
[ivreddy@localhost practice]$ ls
test test1 test2 testfolder.rar
[ivreddy@localhost practice]$
[ivreddy@localhost practice]$ mkdir test
[ivreddy@localhost practice]$ ls
sample1.txt test test1 test1.txt testfolder.rar
[ivreddy@localhost practice]$ cp sample1.txt test1.txt test
[ivreddy@localhost practice]$ cd test
[ivreddy@localhost test]$ ls
sample1.txt test1.txt
[ivreddy@localhost test]$ cp test1.txt test2.txt
[ivreddy@localhost test]$ ls
sample1.txt test1.txt test2.txt
Copy with Recursive and Force in Linux:
[ivreddy@localhost practice]$ cp -rf test test2
[ivreddy@localhost practice]$ ls
sample1.txt test test1 test1.txt test2 testfolder.rar
[ivreddy@localhost practice]$ cd test2
[ivreddy@localhost test2]$ ls
sample1.txt test1.txt test2.txt
Remove with Recursive and Force in Linux
[ivreddy@localhost practice]$ ls
sample1.txt test test1 test1.txt test2 test3 testfolder.rar
[ivreddy@localhost practice]$ rm test1.txt sample1.txt
[ivreddy@localhost practice]$ ls
test test1 test2 test3 testfolder.rar
[ivreddy@localhost practice]$ rm -rf test3
[ivreddy@localhost practice]$ ls
test test1 test2 testfolder.rar
[ivreddy@localhost practice]$
No comments:
Post a Comment