LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-02-2005, 12:16 PM   #1
supersucker
Member
 
Registered: Jul 2004
Location: Berlin
Distribution: fedora 3
Posts: 79

Rep: Reputation: 15
copying 30000 files


hi everybody,

i got the following question:

i have a directory containing 30000 files, all of them ending with .ent.Z
what i want to do now is copy the first 5000 files to a separate directory, then the next
5000 files to another separate directory and so on....

i am not a newbie to linux, but i got no clue how to achieve this, except for writing a perl script.

any ideas how i can do this without using a script?

thanks in advance
 
Old 05-02-2005, 12:26 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
What about:
mv `ls|head -n 5000` /path/to/destination/
 
  


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
Copying files paddyjoy Linux - Newbie 10 10-25-2013 11:12 AM
need help with copying files Earl Parker II Linux - General 8 09-12-2005 08:54 AM
copying files neozero62 Linux - Newbie 1 11-23-2003 05:38 PM
copying files Sol0 Linux - Software 7 08-18-2003 10:40 AM
Copying Files... viperquest Linux - Software 3 03-07-2003 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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