17 Jul
2001
17 Jul
'01
11:47 p.m.
bsamuels@datamansys.co.uk writes:
Is it possible to compare the sizes of two files from within a Bash script? I don't need to know the actual sizes just which one is the bigger file.
bigger_file=$(ls -S1 file1 file2 | head -1)
I can't find anything useful in the Bash man page.
That'll be because it's in the ls man page. Hope that helps.
9012
Age (days ago)
9012
Last active (days ago)
0 comments
1 participants
participants (1)
-
MJ Ray