cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : disk space utilization

Former Member
0 Kudos

Hi ,

We have installed sap on sun solaris sparc10 with oracle as database.We have not created any filesystems we have created /apps filesystems and installed sap under it.Now when i type du -h i am not getting output of the space utilized .I am getting all the list if files .I want to know the disk space utilized directory wise.How to know that.

Accepted Solutions (1)

Accepted Solutions (1)

markus_doehr2
Active Contributor
0 Kudos

> Now when i type du -h i am not getting output of the space utilized .I am getting all the list if files .I want to know the disk space utilized directory wise.How to know that.

I suggest you read the manual: type "man du".

What you are looking for is maybe

cd /apps
du -hs .

Markus

Former Member
0 Kudos

HI ,

I wanted to know to like this file size.If i have /apps as the filesystem then under that i have sapmnt , usr and oracle as directories .Then when i go inside the /apps i type du - h i get number of files which is a big list of files.If i type ls -ltr i get the list of the files only but not their sizes.How to get the sizes also along with them.

markus_doehr2
Active Contributor
0 Kudos

> Then when i go inside the /apps i type du - h i get number of files which is a big list of files.If i type ls -ltr i get the list of the files only but not their sizes.How to get the sizes also along with them.

I still don't get your question.

"du" is "disk usage" - it will show you how much space is allocated on disk. "ls" lists the files.

What do you want now? The total usage of the disks or file sizes? If you want to recursively list directories you have to use a capital -R so

ls -ltR

Did you try the command I gave you?

Markus

Former Member
0 Kudos

Hi,

I guess you wanna know the following:

root@thunder# du -hs

1.4G .

--> As already mentioned this gives you the size of the entire directory including every subdirectory and files

root@thunder# du -hs ./subdir1

764M ./subdir1

--> This gives you the size of a specific subdirectory

root@thunder# du -hs ./*

52K ./file2

4K ./file2

251M ./subdir2

--> This gives you the size of every subdirectory and files.

If you want to get a list of every subdirectory including the size you will have to play with awk a little bit.

HTH

André

Former Member
0 Kudos

OK, here is a statement which gives you a list of all subdirectories and their size:

root@thunder# ls -d */ | awk '{print "du -hs ./" $1}' | sh

3.5M ./dir1

2K ./dir2

6K ./dir3

3.7M ./dir4

2K ./dir5

764M ./dir6

Regards

André

markus_doehr2
Active Contributor
0 Kudos

> OK, here is a statement which gives you a list of all subdirectories and their size:

...or you can use

cd /apps
for i in `ls`; do du -hs $i; done

Markus

Answers (1)

Answers (1)

former_member220071
Active Participant
0 Kudos

Hi Ambarish ,

Try df & df -h , it will shows listing of file system with used and available space.

Regards

Abhijeet