| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| yorkyboy |
Posted: May 6 2005, 03:50 PM
|
|
Newbie ![]() Group: Members Posts: 2 Member No.: 975 Joined: 6-May 05 |
Guys im very new to unux and scripting as a whole, but can anyone tell me if its posible to create a script that looks at say 4 folders, then checks which has the least amount of files in, then copy a file to that folder?.
|
| yorkyboy |
Posted: May 10 2005, 03:08 PM
|
|
Newbie ![]() Group: Members Posts: 2 Member No.: 975 Joined: 6-May 05 |
Guys im trying to create a script that will load ballance 3 devices. Unix is still very alien to me having only been in this position for 3 months now. Not to mention the fact that i've been thrown in the deep end. Anyway so far i've managed to make a script that looks at all 4 devices and make a report:
ls ~/Desktop/printer1/ ~/Desktop/printer2/ ~/Desktop/printer3/ > ~/Desktop/contents.txt This gives me: /Users/Desktop/printer1/: Job1 Job2 job4 /Users/Desktop/printer2/: Job1 Job2 Job3 /Users/Desktop/printer3/: Job1 From this i'd like to create a script that will now copy a file to the emptiest folder. |
| andyb1ack |
Posted: May 10 2005, 04:18 PM
|
||
|
User Level: 4 ![]() ![]() ![]() ![]() Group: Members Posts: 98 Member No.: 513 Joined: 9-September 04 |
Here you go...
|
||
![]() |
![]() ![]() ![]() |