Computing.Net > Forums > Programming > unix shell script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

unix shell script

Reply to Message Icon

Name: Gayatri
Date: September 14, 2009 at 00:40:01 Pacific
OS: Windows XP
Product: Sun microsystems Unix essentials featuring the solaris 10 operating system -
Subcategory: Opinions
Comment:

how to find the size of the file, n how to delete that file if the file size is 0



Sponsored Link
Ads by Google

Response Number 1
Name: virus4u
Date: September 14, 2009 at 01:51:34 Pacific
Reply:

you can use find command and list the files with 0k.

find $path -type f -size 0k -exec ls -lh {} \;

if confirmed you can use the same command to delete these files.

find $path -type f -size 0k -exec rm -f '{}' \;


2
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: unix shell script

Call unix shell script file in a batch progra www.computing.net/answers/programming/call-unix-shell-script-file-in-a-batch-progra/19996.html

Shell Script Calculator www.computing.net/answers/programming/shell-script-calculator/734.html

Unix Shell Script www.computing.net/answers/programming/unix-shell-script/621.html