![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell script to find and replace string in multiple files | pharos467 | Shell Programming and Scripting | 10 | 05-20-2008 08:39 AM |
| Shell script to find out 2 last modified files in a folder..PLZ HELP!!!!!!!!! | anju | Shell Programming and Scripting | 3 | 01-31-2008 09:47 PM |
| Find and Replace in multiple files (Shell script) | jatins_s | Shell Programming and Scripting | 13 | 11-05-2007 10:11 AM |
| shell script to find files by date and size | dadadc | UNIX for Dummies Questions & Answers | 1 | 10-20-2007 02:18 AM |
| shell script to find files | naren_samba2005 | Shell Programming and Scripting | 2 | 10-21-2005 02:06 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
shell script to find zero byte files
I have a directory MYDIR
In which i have several directories 1,2,3,4.... Now, In each of these directories i have several files a.dat, b.dat, c.dat, d.dat..... MYDIR ----1 ---------a.dat ---------b.dat ---------c.dat ---------d.dat ----2 ---------a.dat ---------b.dat ---------c.dat ---------d.dat ----3 ---------a.dat ---------b.dat ---------c.dat ---------d.dat . . . . . Task: to find the zero byte .dat files and move them to a different directory how do i do this!!! my pseudo approach: #!/bin/sh source= "/root/MYDIR/" dest= "/root/MYDIR/log" foreach i($source) do find *.DAT -size 0c -exec mv '{}' ${dest} \; done appreciate any ideas |
| Forum Sponsor | ||
|
|
| Thread Tools | |
| Display Modes | |
|
|