Solved

cp -arL /etc /tmp/etc.backup

Posted on 2011-02-26
2
473 Views
Last Modified: 2012-08-14
what will this command do ?
0
Comment
Question by:aashee
  • 2
2 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34988495
Hi,

this command will copy ("cp") recursively ("-R", which is already implied with "-a") the contents of the /etc directory to the /tmp/etc.backup directory.
It will work in archive mode ("-a") which means "recursively" (include subdirectories and files in subdirectories), "do not follow links" (copy the links themselves, not their targets) and preserve all attributes like mode,ownership,timestamps ...

wmp
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 34988703
Seems I overlooked the option "-L" in your post.

No wonder, because it's contradictory to "-a",

"-a" implies " --no-dereference" , which means "don't follow symbolic links", whereas "-L" is the same as "--dereference", which means "always follow symbolic links" (= create real files instead of links).

As the last entered option takes precedence the command you posted will copy files instead of their links. You will have to decide whether this is the desired behavior.

wmp


0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now