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.