|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Hello,
Has anyone anyidea how can i see for any file how much KB or MB or GB is the file, and when it has the last update? for e.g: an .mrc file
thanks
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Look at $file() and $bytes()
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Yes i had a look and when i do it it return an number but what kind of number is , Kilobytes? or Bytes? , also when i use the .atime prop it return me a number how can i get the resault for e.g: 08/01/2010
e.g: alias test { echo -s is: $file($script).size }
Last edited by westor; 08/01/10 09:24 PM.
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
$file().size returns the size in bytes. You can use $asctime() to convert $file().atime to a human-readable value.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Well if you run it on $script - (ie. a small text file) and it returns a value in the hundreds or thousands range, logic should narrow it down fairly quickly. In fact, logic should narrow it down regardless.
Plus the second half of my post kind of gives it away.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
can you give me an example how can i convert from bytes to kilobytes? or the .mtime / .atime prop ?
Last edited by westor; 08/01/10 09:28 PM.
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
$bytes($file($script).size).suf
$asctime($file($script).mtime)
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
|
|
|
|
|
|