Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Script to Compare file size and delte the smaller

$
0
0
I am pretty new to scripting, so I appreciate your advice in advance.
The problem:

100 directories each containing 2 files that have the same extension with random names. The only attribute that discriminates the files is size. I would like to write a script that compares the files for size and deletes the smaller of the two. Thanks! - OSX, X11, bash

Viewing all articles
Browse latest Browse all 16232

Trending Articles