Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

(newbie - just signed up) I am wondering why when I type the ls -l, ls -lh etc, why it gives the size of my Download file as 4 kilobytes when it is actually 20.7 gigabytes when I click properties on the GUI. I have looked at previous questions but did not find an answer to this seeming anomoly. Thanks. The other thing is being a newbie I hope I can find my question post again if there is a reply - not at all certain about this but have ticked the email reply box at least.

share|improve this question

1 Answer 1

~/Downloads is a directory, not a file. It simply points to the list of files that directory contains (i.e., the files you downloaded). ls gives you the size of that pointer, which is usually 4k.

When you view that directory in a file explorer, the program assumes you want the total size of files within that directory. You can get this from the command line, too, of course - try du -hs Downloads.

See this post for more info.

share|improve this answer
    
Thanks Jamie - I have been looking for a readable tutorial for newbies for weeks and finally found one at wiki.lib.sun.ac.za/images/c/ca/TLCL-13.07.pdf . Thought I would add this for anyone with the same problem. –  user276081 May 7 at 23:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.