#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    5
    Rep Power
    0

    problems with "cp" (reliant unix 5.43)


    Hi,

    I've got a problem with the copy - command (reliant unix 5.43). It appears to me rather difficult to copy large amount of data. A command like "cp *.jpg" is simply refused. Does anybody know something about such a kind of restriction? Something like ... only 256 files could be copied at once. Perhaps it stays in relation with the file-system. It still appears strange to me ...

    Thanks in advance!

    sysadv
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    Probably a problem with the maximum length of the command line arguments.

    "*" is expanded by the shell, not read by cp, so it has to pass all filenames on a single line.

    Try something like this:
    Code:
    for i in *.jpg; do cp "$i" /destdir/; done
    hth,
    M.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    5
    Rep Power
    0
    Much thanks for your comment. I'll check it out immediately. At the first glance your suggestion appears to be very helpful ... Thanks again! Bye Sysadv

IMN logo majestic logo threadwatch logo seochat tools logo