LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-01-2005, 12:15 AM   #1
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Rep: Reputation: 30
Copy file problem


I copy some files from the folder /var/named which contains some DNS/Bind files. After i copied them to another directory, each source file icon has a green reverse arrow on right top and when i right click properties on it, it disappeared. Even the target directory copied files also like this. Any idea why ? Thanks

Rgds
Daniel
 
Old 09-01-2005, 01:38 AM   #2
kaverong
LQ Newbie
 
Registered: Sep 2004
Location: Philippines
Distribution: CentOS, Gentoo, Ubuntu, Redhat, Fedora. FreeBSD
Posts: 13

Rep: Reputation: 0
whenever you copy a file or directory the original context will not be preserved. The method of copying you should use should have preserved parameter.
 
Old 09-01-2005, 03:13 AM   #3
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Original Poster
Rep: Reputation: 30
How ?


Quote:
Originally posted by kaverong
whenever you copy a file or directory the original context will not be preserved. The method of copying you should use should have preserved parameter.
 
Old 09-01-2005, 03:43 AM   #4
kaverong
LQ Newbie
 
Registered: Sep 2004
Location: Philippines
Distribution: CentOS, Gentoo, Ubuntu, Redhat, Fedora. FreeBSD
Posts: 13

Rep: Reputation: 0
cp -p [source] [destination]

cp --help
 
Old 09-01-2005, 10:57 PM   #5
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Original Poster
Rep: Reputation: 30
how to use mouse right click copy and paste ? Btw do you know abt Bind/dns in linux Fc3?

Quote:
Originally posted by kaverong
cp -p [source] [destination]

cp --help
 
Old 09-14-2005, 07:26 PM   #6
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Original Poster
Rep: Reputation: 30
Hi, if the target directory already got same file, how to overwrite them ?

Regards
Daniel


Quote:
Originally posted by kaverong
cp -p [source] [destination]

cp --help
 
Old 09-14-2005, 09:49 PM   #7
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
It's the same 'cp' command. Try it and you'll see what I mean.

-twantrd
 
Old 09-15-2005, 12:56 AM   #8
kaverong
LQ Newbie
 
Registered: Sep 2004
Location: Philippines
Distribution: CentOS, Gentoo, Ubuntu, Redhat, Fedora. FreeBSD
Posts: 13

Rep: Reputation: 0
to overwrite existing file

cp -f

-f is force parameter

for other parameter options

cp --help
 
Old 09-16-2005, 10:36 AM   #9
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Original Poster
Rep: Reputation: 30
Previously i copied some files from /var/named/ to /var/named/chroot/var/named/ with copy and paste. Those files are now linked (have a green turn around arrow) on each copied file. Now i can't copy them to the target directory althought target directory file is deleted. Whenever i use "cp -p -f /xxx/xxx/filename /xxx/xxx/" it will say no such file or directory. Any idea ?

Regards
Daniel


Quote:
Originally posted by kaverong
to overwrite existing file

cp -f

-f is force parameter

for other parameter options

cp --help
 
Old 09-17-2005, 12:16 PM   #10
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Quote:
Those files are now linked (have a green turn around arrow) on each copied file. Now i can't copy them to the target directory althought target directory file is deleted.
You mean they are symlinked now? It's a bit hard to debug your problem since we don't know what happened. Let's check your files. Do this:

1. ls -al /xxx/xxx/filename
2. ls -ald /xxx/xxx

-twantrd
 
Old 09-18-2005, 06:55 AM   #11
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
Re: Copy file problem

Quote:
Originally posted by DanielTan
I copy some files from the folder /var/named which contains some DNS/Bind files. After i copied them to another directory, each source file icon has a green reverse arrow on right top and when i right click properties on it, it disappeared. Even the target directory copied files also like this. Any idea why ? Thanks

Rgds
Daniel
How are you viewing these icons? I don't get any icons with ls.
 
Old 09-21-2005, 06:25 PM   #12
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Original Poster
Rep: Reputation: 30
Hi, when i copy from this folder to the chroot foler, it says destination file is the same file. It is symlink. How to break it the link ?

Rgds
Daniel


Quote:
Originally posted by twantrd
You mean they are symlinked now? It's a bit hard to debug your problem since we don't know what happened. Let's check your files. Do this:

1. ls -al /xxx/xxx/filename
2. ls -ald /xxx/xxx

-twantrd
 
Old 09-21-2005, 06:27 PM   #13
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Original Poster
Rep: Reputation: 30
Re: Re: Copy file problem

I view them in window browser. Previously i just click copy and paste. I think now they are symlink. Anyway to break the link ? i tried cp -f it also wont overwrite them.

Rgds
Daniel


Quote:
Originally posted by eddiebaby1023
How are you viewing these icons? I don't get any icons with ls.
 
Old 09-21-2005, 11:42 PM   #14
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
'rm' the link and copy again.

-twantrd
 
Old 09-22-2005, 01:09 AM   #15
DanielTan
Member
 
Registered: Sep 2004
Location: Malaysia
Distribution: FC6, Solaris
Posts: 340

Original Poster
Rep: Reputation: 30
change to the destination directory and "rm" the file ?

Rgds
Daniel


Quote:
Originally posted by twantrd
'rm' the link and copy again.

-twantrd
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy mysql file into text file lumba General 0 09-26-2005 05:08 AM
smbclient copy problem (cant stat file...) taiwf Linux - Networking 6 08-01-2005 05:27 PM
Is arrangement of file systems will differ if we copy a file from FAT 32 to ext 3 ? anindyanuri Linux - Software 2 02-20-2005 11:39 AM
samba file copy problem hariiyer Linux - Networking 6 01-27-2005 12:31 AM
copy file Eddie9 Linux - General 0 04-22-2002 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:20 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