Solved

Basic Linux Command

Posted on 2002-04-15
3
193 Views
Last Modified: 2012-05-04
How can I see the sizes of the linux directory with sub-directory. e.g "dir /s" in DOS
0
Comment
Question by:kennycpu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 30 total points
ID: 6943914
do your mean the total amount of space a directory and its subdir's occupies? For that you'd use 'du -s /path-to/some-dir'. Check 'man du' for more options.

If you want to see all of the files in a dir and subdirs use:

ls -R /path-to/some-dir
 -or-
ls -lR /path-to/some-dir
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6943965
ls -lR|awk '/^-/{bytes+=$5}END{print bytes}'
0
 

Expert Comment

by:pmonz
ID: 6947319
du -h <dirname>

where <dirname> is the name of the directory or . for the actual directory.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question