Linux - NewbieThis 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.
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.
I think there may be something wrong with the cp command (copy).
I have a link pointing at nothing. It used to point at a file called "no" but that file is now gone.
I wish to copy the link exactly as is, preserving ownership and timestamp.
According to the Man page, cp -a should do this, however imagine my surprise when the timestamp changed.
[root]# cp -a x.x y.y
[root]# ls -lrt x.x
lrwxrwxrwx 1 root root 2 Aug 14 17:28 x.x -> no
[root]# ls -lrt y.y
lrwxrwxrwx 1 root root 2 Aug 14 18:49 y.y -> no
What distribution and kernel are you running?
cat /etc/issue
uname -a
It may be you have an old binutils that needs to be updated.
Also type "which cp" to see where it is finding the cp command. If it shows an alias that may be your issue. If it shows a file then type "file <pathto/cp> to verify it is a binary rather than a script.
What distribution and kernel are you running?
cat /etc/issue
uname -a
It may be you have an old binutils that needs to be updated.
Also type "which cp" to see where it is finding the cp command. If it shows an alias that may be your issue. If it shows a file then type "file <pathto/cp> to verify it is a binary rather than a script.
[root]# uname -a
Linux bk1.localdomain 2.6.20-1.2320.fc5 #1 Tue Jun 12 18:50:38 EDT 2007 i686 i686 i386 GNU/Linux
[root]# cat /etc/issue
Fedora Core release 5 (Bordeaux)
Kernel \r on an \m
I installed FC5 from a CD then did yum update kernel.
I have also tried it calling /bin/cp directly - it is a binary.
[root]# file /bin/cp
/bin/cp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.