LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 06-16-2007, 01:56 AM   #1
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Rep: Reputation: 30
copy command


hi all
how can i copy largefiles (10Mb to 10Gb)
i tried using this command "cp -r xxxxx-1.1.1.tar.gz" to some path , this path i am giving
i did this all by programatically..
but this program copying only small files like .xpm, .png, .txt, .c etc...
when i am sending xxxxx-1.1.1.tar.gz of 1.2Mb size it saying like this and also not copying
Quote:
cp: cannot stat `xxxxx-1.1.1.tar.gz': No such file or directory
how can i copy this type of large file tooo?

can you please help me

thank you in advance.
 
Old 06-16-2007, 03:02 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
The message says that the file doesn't exit. Check for a typo. The -r recursive option doesn't make sense if you are copying a single file. It is for descending into directories. The "xxxx-" part of the filename doesn't look right. It seems that you are following general instructions literally instead of substituting xxxx for the package name.
 
Old 06-16-2007, 03:16 AM   #3
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
thank you for quick replay

Quote:
Originally Posted by jschiwal
The message says that the file doesn't exit. Check for a typo. The -r recursive option doesn't make sense if you are copying a single file. It is for descending into directories. The "xxxx-" part of the filename doesn't look right. It seems that you are following general instructions literally instead of substituting xxxx for the package name.
i tried this also...
"cp " (with out -r)
but it fails.
same error was came..(cp: cannot stat `filename-1.1.1.tar.gz': No such file or directory)

i would like to copy any file with any size...

how can i do this..

thank you in advance
 
Old 06-16-2007, 03:59 AM   #4
lakris
Member
 
Registered: Sep 2004
Location: Stockholm, Sweden
Distribution: Ubuntu, RedHat, SuSe, Debian, Slax
Posts: 102

Rep: Reputation: 15
There is no size restrictions on the cp command.
As stated, the error message is that the file cannot be found.
Are You sure You type it correctly? Upper/lower case? Spaces?
Are You doing the copy from a script?
Make sure You have the correct directory as working directory.
An option is to give the fully qualified file name to the command, example
cp /tmp/qwerty-1.1.1.tar.gz /var/backup
If You have spaces in the filename, put quotes around it, example
cp "/tmp/qwerty 1.1.1.tar.gz" /var/backup
 
Old 06-16-2007, 05:56 AM   #5
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by lakris
There is no size restrictions on the cp command.
As stated, the error message is that the file cannot be found.
Are You sure You type it correctly? Upper/lower case? Spaces?
Are You doing the copy from a script?
Make sure You have the correct directory as working directory.
An option is to give the fully qualified file name to the command, example
cp /tmp/qwerty-1.1.1.tar.gz /var/backup
If You have spaces in the filename, put quotes around it, example
cp "/tmp/qwerty 1.1.1.tar.gz" /var/backup
yes i did ...its great..

i am using this command for file receiving from one machine to another...
am sending a file to another machin eby using sockets..
at other side a popup window will raise.. and having an option to save file...

here in this "cp" is using...
this is not yet tested, but i have a doubt,
"cp" is able to copy the file which was sent by other machine..?

help me

thank you in advance
 
Old 06-16-2007, 06:06 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Look at the directory listing to see what the name is really called. Also, either make sure you are in the right directory, or include the directory location in the filename.

It might be better mounting a network share to transfer files to another computer.
You can do it using netcat or cat'ing to /dev/tcp/hostport and doing the reverse on the other machine. See the bash info manual for details.

You could also use scp or sftp.

If the file you are transferring is very large, make sure you don't exceed the filesize limit of the target filesystem.
 
Old 06-16-2007, 07:02 AM   #7
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jschiwal
Look at the directory listing to see what the name is really called. Also, either make sure you are in the right directory, or include the directory location in the filename.

It might be better mounting a network share to transfer files to another computer.
You can do it using netcat or cat'ing to /dev/tcp/hostport and doing the reverse on the other machine. See the bash info manual for details.

You could also use scp or sftp.

If the file you are transferring is very large, make sure you don't exceed the filesize limit of the target filesystem.
yes you are coreect.
but those are asking IPadress and password...
so, can i do this file transfering and receiving using "sip".

help me

thank you in advance
 
Old 06-16-2007, 08:53 AM   #8
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Maybe you should provide more information on what you are transfering and to what. Is it a mobile phone?
 
Old 06-17-2007, 05:15 AM   #9
lakris
Member
 
Registered: Sep 2004
Location: Stockholm, Sweden
Distribution: Ubuntu, RedHat, SuSe, Debian, Slax
Posts: 102

Rep: Reputation: 15
I agree, Your description is very hard to understand.
Are You trying to copy a file from one computer to another with cp? What does Your command line look like?
 
Old 06-17-2007, 11:13 PM   #10
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
thank you for quick replay

Quote:
Originally Posted by lakris
I agree, Your description is very hard to understand.
Are You trying to copy a file from one computer to another with cp? What does Your command line look like?
yes.... i am doing that, what u said.
i am sending files through sockets at other side the popup will be raised and having a save button if i click the save button it will save in perticular folder..... , here , i am using

cp -i xxxxx-1.1.1.tar.gz /root/Desktop/123

is it possible.
yeah i did some extent.. upto save button clicked...
here the error message is accuring in the terminal
cp: cannot stat `xxxxx-1.1.1.tar.gz': No such file or directory

i dont know why it is saying(terminal) like that..

can you please help me

thank you in advance
 
Old 06-18-2007, 01:44 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
unrelated to networking. moved to linux - general
 
Old 06-18-2007, 03:26 AM   #12
lakris
Member
 
Registered: Sep 2004
Location: Stockholm, Sweden
Distribution: Ubuntu, RedHat, SuSe, Debian, Slax
Posts: 102

Rep: Reputation: 15
I am sorry but I really don't see what You are trying to do. There is no pop-up with buttons in the cp command. Are You using netcat or something? Maybe You mean rcp? I can't see anything that indicates that You are communicating between different hosts.
The command You show would try to copy the file xxxxx-1.1.1.tar.gz from Your working directory to /root/Desktop/123. If 123 is a directory the file will be placed in that directory. If nothing called 123 exist, xxxxx-1.1.1.tar.gz will be copied to /root/Desktop and renamed to 123. If 123 is a file it will be overwritten with the contents of xxxxx-1.1.1.tar.gz after asking You for confirmation.
If it is a socket I don't know how it works.
The error message states very simply that there is no file called xxxxx-1.1.1.tar.gz in Your working directory.
 
Old 06-18-2007, 05:21 AM   #13
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by lakris
The error message states very simply that there is no file called xxxxx-1.1.1.tar.gz in Your working directory.
no, i have the file.
and i tried rcp also.
the same error is coming.
 
Old 06-18-2007, 06:07 AM   #14
lakris
Member
 
Registered: Sep 2004
Location: Stockholm, Sweden
Distribution: Ubuntu, RedHat, SuSe, Debian, Slax
Posts: 102

Rep: Reputation: 15
What is the output from the command
ls -l xxxxx-1.1.1.tar.gz

?
 
Old 06-18-2007, 06:25 AM   #15
munna_dude
Member
 
Registered: Dec 2006
Posts: 362

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by lakris
What is the output from the command
ls -l xxxxx-1.1.1.tar.gz

?
-rw-r--r-- 1 root root 1221948 Jun 13 10:41 xxxxx-1.1.1.tar.gz

this is...
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
folder copy command bobb_roof Linux - Newbie 4 11-04-2006 04:59 PM
Help on copy command Nishant Desai Linux - Software 3 09-20-2006 02:50 AM
Symlinks and the copy command gbj Linux - General 5 10-31-2004 03:37 PM
copy command with out prompt imsajjadali Red Hat 4 05-30-2004 11:42 PM
Copy Command rlkiddjr Linux - General 2 05-07-2002 01:37 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration