Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    1

    Unanswered: disk space used for a few files in few directories

    Hello,
    I am new to shell scripting and have a k shell. I need to develop a script wherein it should give an output of the total disk space used for certain no. of files within certain directories.
    The main directory is fileserver01, under which I have different directories with names say.. dir1, dir2,dir3,dir4,dir5. under each of these, there are different files. My question is... I need to get the amont of space used for the files(excluding files starting with del.*) in each of dir1,dir2 and dir3.


    Thanks in advance.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You could use find with "-ls" option to list file sizes and then awk to sum them up.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •