I am having some issues to copy a folder with files in that folder into another folder. Command cp -r
doesn't copy files in the folder.
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
- Null-terminated string, opening file for reading
Use:
The option you're looking for is
-R
.destination
doesn't exist, it will be created.-R
meanscopy directories recursively
. You can also use-r
since it's case-insensitive./
as per @muni764's comment.You are looking for the
cp
command. You need to change directories so that you are outside of the directory you are trying to copy. If the directory you're copying is calleddir1
and you want to copy it to your/home/Pictures
folder:Linux is case-sensitive and also needs the
/
after each directory to know that it isn't a file.~
is a special character in the terminal that automatically evaluates to the current user's home directory. If you need to know what directory you are in, use the commandpwd
.When you don't know how to use a Linux command, there is a manual page that you can refer to by typing
at a terminal prompt.
Also, to auto complete long file paths when typing in the terminal, you can hit Tab after you've started typing the path and you will either be presented with choices, or it will insert the remaining part of the path.