aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: can a batch script detect the file size?  (Read 3790 times)

Karhandras

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 47
can a batch script detect the file size?
« on: December 20, 2006, 02:34:53 PM »

hi everyone,
I have a quite strange configuration on my net, and since my server's HDD is too small I transfer all the completed downloads on a NAS.
This NAS is formatted in FAT32 (can't do different...) so, as u all know, i can't copy on it files larger than 2GB.

And now the question:

how can I detect the file size with a bash script, so i can select what file to move and what to leave?

thx for suggestions :)
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: can a batch script detect the file size?
« Reply #1 on: December 20, 2006, 03:47:59 PM »

Hi Karhandras!

Try stat -c%s filename.
Logged

AnimAlf

  • Full Member
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 225
    • Home
RE: can a batch script detect the file size?
« Reply #2 on: December 20, 2006, 07:30:56 PM »

Quote
Originally posted by Karhandras
This NAS is formatted in FAT32 (can't do different...) so, as u all know, i can't copy on it files larger than 2GB.

You don't know the driver : http://www.fs-driver.org

You can write in win without a problem in ext2 and ext3.

Probe aMule in ext2 o 3 in win also ;-)

Karhandras

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 47
Re: can a batch script detect the file size?
« Reply #3 on: December 20, 2006, 09:25:56 PM »

thx wuischke that fix perfectly :)

thx even to AnimAlf but the problem is that the NAS firmware doesn't allow me to format the HDD in other FS, and i even has a mini linux kernel inside!
So I just have to take it that way (or hack it when warranty expires :D )
Logged