cp command problem

Please post any bugs you have found
Post Reply
Message
Author
snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

cp command problem

#1 Post by snayak »

Hi,

I am using Lucid puppy 5.2.0, full installation.
Yesterday I tried to copy a 2 gb file from pen drive to hard disk.
After 1.6 gb copied, there was a message in terminal, "KILLED".
and copy couldn't complete.

I tried again and there was a message, "I/O error".
And surprisingly my pen drive mount point changed from sdb to sdc.

Have you ever seen any such problem?
Does cp command work for >= 2 GB file?

I tried to see what is causing error. htop was showing memory usage for cp as follows:
Mem [********||@@@@@@@@@@@@@ 78/378MB]
where,
****** = used
|| = buffers
@@@@@@@@@@@@ = cache


Sincerely,
Srinivas Nayak

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#2 Post by jpeps »

yep...2gig limit for FAT drive. I read somewhere about using "split" worked.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#3 Post by Sylvander »

1. "Have you ever seen any such problem?"
(a) Yes, when I was attempting to copy files from an external [USB2.0 connected] HDD with "bad blocks".
Most of the files would copy OK, but whenever I attempted to copy a file, part of which resided on a bad region of the drive...
The copy would fail at that point.

(b) Perhaps you should use GParted to "check"->[scan & fix] the file systems of the source and destination partitions.

2. "my pen drive mount point changed from sdb to sdc"
(a) Did the OS suddenly detect the presence of another partition [file system] at that instant in time?

3. "yep...2gig limit for FAT drive"
Wouldn't it be OK to copy a 2GB file?
Within the 2GB limit?

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#4 Post by jpeps »

Sylvander wrote:
3. "yep...2gig limit for FAT drive"
Wouldn't it be OK to copy a 2GB file?
Within the 2GB limit?
It appears not...I'd try split. Then again, never trust a pen drive.

snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

#5 Post by snayak »

Sylvander wrote:1. "Have you ever seen any such problem?"
(a) Yes, when I was attempting to copy files from an external [USB2.0 connected] HDD with "bad blocks".
Most of the files would copy OK, but whenever I attempted to copy a file, part of which resided on a bad region of the drive...
The copy would fail at that point.

(b) Perhaps you should use GParted to "check"->[scan & fix] the file systems of the source and destination partitions.

2. "my pen drive mount point changed from sdb to sdc"
(a) Did the OS suddenly detect the presence of another partition [file system] at that instant in time?

3. "yep...2gig limit for FAT drive"
Wouldn't it be OK to copy a 2GB file?
Within the 2GB limit?
2. Yes, OS suddenly show me presence of sdc on desktop. But sdb was not there any more.

3. Actually I made a 2 gb img file for using with qemu. that 2gb file I was transferring from pendrive to disk.
And, why there is such a limit on file size to copy? I think other linux OSs don't have that!

Many thanks for your suggestions on pen drive checking.
I'll do that.

Sincerely,
Srinivas

snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

#6 Post by snayak »

jpeps wrote:
Sylvander wrote:
3. "yep...2gig limit for FAT drive"
Wouldn't it be OK to copy a 2GB file?
Within the 2GB limit?
It appears not...I'd try split. Then again, never trust a pen drive.
Is split command comes by default with puppy 5.2.0?
Or I need to install some PET package?

Sincerely,
Srinivas

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#7 Post by Flash »

To find out if your Puppy has split, open a console and enter split --help.

Do you have another flash drive you can use to test if the cp command will work with it? Or any other kind of external USB drive, such as a USB hard disk drive?

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#8 Post by 8-bit »

I am just curious as to what info is shown if you hover over the pen drive icon in Puppy. Does it show fat or fat32?

Also, I have never figured out how the manufacturers are able to format a large capacity pen drive to fat.
If I try it, I run into fat size limitations.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#9 Post by Sylvander »

1. "why there is such a limit on file size to copy?"
I'm no expert, but I believe...
The 2GB file size limit is a technical limitation of the FAT16 file system.
4GB is the file size limit of a FAT32 file system.
NTFS file system can handle file sizes waaayy in excess of 4GB.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#10 Post by jpeps »

snayak wrote: Is split command comes by default with puppy 5.2.0?
Or I need to install some PET package?

Sincerely,
Srinivas
It's a gnu coreutility.

example: "split -b500m largefile smallfile"
to join: cat smallfile.* >> largefile

Post Reply