LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-20-2008, 01:01 PM   #1
chakribobby
Member
 
Registered: Jan 2007
Posts: 49

Rep: Reputation: 15
problem with copying


Hi
While trying to copy I got this error message

ptcvm5:/home/test1 # cp -rp /home/IR2ZLM/* .
cp: will not create hard link `./data/packages/client/rhel-4es-x86_64' to directory `./data/packages/client/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/client/rhel-4ws-x86_64' to directory `./data/packages/client/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/edir/rhel-4es-x86_64' to directory `./data/packages/edir/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/edir/rhel-4ws-x86_64' to directory `./data/packages/edir/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/edir/sles-10-x86_64' to directory `./data/packages/edir/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/edir/sles-10-i586' to directory `./data/packages/edir/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/edir/sles-9-i586' to directory `./data/packages/edir/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/edir/sles-9-x86_64' to directory `./data/packages/edir/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/imaging/rhel-4es-x86_64' to directory `./data/packages/imaging/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/imaging/rhel-4ws-x86_64' to directory `./data/packages/imaging/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/imaging/sles-10-x86_64' to directory `./data/packages/imaging/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/imaging/sles-10-i586' to directory `./data/packages/imaging/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/imaging/sles-9-i586' to directory `./data/packages/imaging/rhel-4as-x86_64'
cp: will not create hard link `./data/packages/imaging/sles-9-x86_64' to directory `./data/packages/imaging/rhel-4as-x86_64'

thanks in advance
 
Old 09-20-2008, 11:37 PM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 748

Rep: Reputation: 31
You can't create "hard links" to directories. Trust me, you don't want to, you delete the hard link, the directory disappears as well, a likely unwanted side effect of hard links (they share the same inode number, essentially making the link and the destination the same entity). The fix, as it were, is to add the "-s" (soft link) option. Almost all links you make will be soft links, although hard links can be useful in certain situations. So, for your example, you'd need to type:

cp -srp /home/IR2ZLM/* .

Hope this helps.

Last edited by scott_R; 09-20-2008 at 11:39 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem copying to emacs -nw xowl Linux - Software 6 01-04-2007 10:42 PM
Problem with copying string alltime Programming 5 04-13-2005 09:05 PM
proftp copying problem zatka Linux - Networking 2 01-11-2005 10:27 PM
Problem in copying a file in C akin81 Programming 11 04-06-2004 08:06 AM
Samba problem with copying abajde Linux - Networking 2 02-27-2004 04:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration