sudo cp /home/webnoidschools/* /opt/newdirectory/
When I do this, I start getting the following as output:
cp: omitting directory `file1′
cp: omitting directory `file2′
cp: omitting directory `file3′
cp: omitting directory `file4′
Solution :
By default, cp copies only the direct files in, and not subdirectories in the directory.
To do so, specify the -r (or –recursive) option:
sudo cp -r /home/webnoidschools/* /opt/NewDirectory/