Skip to main content
16 events
when toggle format what by license comment
Feb 10, 2016 at 16:21 vote accept newBee
S Feb 10, 2016 at 16:14 history edited newBee
Question is about size file and directory , not disk-usage.
S Feb 10, 2016 at 16:14 history suggested GAD3R
Question is about size file and directory , not disk-usage.
Feb 10, 2016 at 16:13 review Suggested edits
S Feb 10, 2016 at 16:14
Feb 10, 2016 at 16:11 answer added RealSkeptic timeline score: 2
Feb 10, 2016 at 15:59 history edited newBee CC BY-SA 3.0
added 309 characters in body
Feb 10, 2016 at 15:54 comment added newBee @RealSkeptic 20 folders and around 10k files. The hierarchy is 3 levels deep.Updated the question to give you a rough example
Feb 10, 2016 at 15:45 comment added RealSkeptic How many files are in that folder? Could your WinSCP be counting just the contents of the files and ignoring the actual folders?
Feb 10, 2016 at 15:20 comment added MelBurslan find is recursive from the top level directory name you give, unless it is explicitly told the depth. Does this folder contain a lot of so-called sparse files by any chance ? Like database table containers and such ?
Feb 10, 2016 at 15:08 history edited newBee CC BY-SA 3.0
added hint that it needs to include subfolders/has to be recursive
Feb 10, 2016 at 15:07 comment added newBee Despite running very very long it always returns 0. Maybe should have mentioned that the folder contains subfolders, so it has to be recursive.
Feb 10, 2016 at 14:59 comment added MelBurslan try running this command and see what it gives you a=0;find some_dir_name_here -type f | xargs ls -l| while read line; do b=$(echo $line|awk '{print $5}'); (( a=$a+$b ));done; echo "Size is " $a
Feb 10, 2016 at 14:51 comment added newBee without the modifier it returns a folder size of approx. 1G. Although this might be the actual "size on disk" this is not the "real file size".
Feb 10, 2016 at 14:48 comment added MelBurslan try du -sk or du -sh without the --apparent-size modifier.
Feb 10, 2016 at 14:37 review First posts
Feb 10, 2016 at 14:49
Feb 10, 2016 at 14:33 history asked newBee CC BY-SA 3.0