Wanted to get the size of files in a folder, in this particular case all the csv files, and came up with this after reviewing what others had done.
- First find all the csv files in a particular location:
- Then use
xargsand run the
- Take the last entry of the output:
- Finally cut the first continuous word (field) out of that output:
cut -f -1
find *.csv | xargs du -ch | tail -1 | cut -f -1