![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: May 2005
Location: ma
Posts: 130
Rep Power: 4
![]() |
Dealing with size in scripts.
I have a few scripts in mind that would deal with file sizes but i don't know how to handle them. I want to be able to do a command limited by a certain size and be able to search for files above a certain size. Any help would be appreciated. thanks in advance.
|
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4
![]() |
use du to get file sizes... check out the du man page for useful options. just store the output of 'du filename' in a variable and set up an if block... put the commands that are conditional on size within the if block.
__________________
"A stupid man's report of what a clever man says can never be accurate, because he unconciously translates what he hears into something he can understand." - B. Russell http://web.bryant.edu/~srk2 |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 314
Rep Power: 4
![]() |
"nothing strengthens authority so much as silence" -LdV
...but it doesn't do as much for your post count as constant gibbering, does it? ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|