Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-11-2017, 06:37 AM
|
#1
|
Member
Registered: Nov 2014
Posts: 56
Rep: 
|
can cp copy all files include symlink
I have a folder , there are many files and symlink under it , I would like to use the command "cp" to backup all these files ( not only the local files , also want to backup the files of the symlink , not just the symlink itself ) , can cp do that ?
I know other command eg. tar can do that , but just want to check if "cp" can do also .
Thanks
|
|
|
03-11-2017, 07:10 AM
|
#2
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,337
|
You should learn about the "man" and "info" commands.
|
|
1 members found this post helpful.
|
03-11-2017, 08:20 AM
|
#3
|
Member
Registered: Nov 2014
Posts: 56
Original Poster
Rep: 
|
just would like to confirm if I use cp -R , it just copy the symlink but not the files ?
thanks
|
|
|
03-11-2017, 08:46 AM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,792
|
Quote:
Originally Posted by QWE123
just would like to confirm if I use cp -R , it just copy the symlink but not the files ?
|
You do realize you could have just tried it and found out, faster than you could have posted here, right? Very simple to test..create a symlink, and try to copy it.
And as smallpond suggested, look into the man pages.
|
|
|
03-11-2017, 01:53 PM
|
#5
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
just in case this isn't understood:
open a terminal and enter => instant benefit!
|
|
|
All times are GMT -5. The time now is 07:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|