Linux command of the day

So I decided to take advantage of the free 50Gb storage space that DreamHost offers all of its webhosting customers today.
Unfortunately, I didn’t understand that I needed to use a special user account that Dreamhost provides for me for this activity. So I am currently uploading approximately 25Gb of pictures to my account on just a normal user account. I may have my account revoked by the end of the day, who knows.
The situation isn’t too dire just yet, as evidenced by the linux command I just learned.
I logged in to my account from work to see how much data had been uploaded so far. I found the folder, but had no idea how to actually see any detail on the folder’s size. Performing a quick DuckDuckGo search has taught me to use the ‘du’ command to see the size of a folder.
So I ran ‘du -sh /Pictures’ and was greeted with the following response:
616M    Pictures/
The -s parameter means to ‘summarize’. This provides only the disk usage of the specified argument, in my case, the size of the ‘Pictures’ folder. Without this parameter, I would be given an itemized list of the disk size of all of the folders within this folder.

The -h paramenter means to make the output ‘human-readable’. Namely, converting the raw ‘616543’ kilobyte size to ‘616M’. Very handy since I hate mental math.

So its not too bad now, but I gotta get home and stop this from getting worse. Good thing its lunch time.
I can stop the process and start uploading using the appropriate account now.

Well I’m off to stop a runaway FTP upload. Times like these that I really wish I had set up my laptop for remote contol…

Comments are disabled

%d bloggers like this: