The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-15-2008
Bhanu72 Bhanu72 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 4
Smile files from directory to another.

I have 10000 files in a directory. The name is something like:

1.dat
2.dat
3.dat
4.dat
.....
.....
.....
1000.dat.
----
-----

Files are not sorted. I want to move first 500 largerst files from this directory to another directory. Next 500 largest files to another directory.

what would be the simple korn shell script for this problem?

thanks

Last edited by Bhanu72; 07-15-2008 at 08:31 PM..