Post

copy an entire directory in linux

When copying an entire directory dir1 to another directory dir2, use the cp command with the -r flag, i.e:

1
2
3
4
5
$ ls 
file1
$ cp -r file1 file2
$ ls
file1 file2
This post is licensed under CC BY 4.0 by the author.