Need command to know the total size


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Operating Systems Solaris Need command to know the total size
# 1  
Need command to know the total size

Smiliei need command to know the total size of project in my system by Giga bit
i try
#du -s /*/projectname

but i need total size for this project by G.B

can you help me
# 2  
use the "-h" option
# 3  
You cannot force GB, but if you use du -sh to get an automatically scaled output, which is in GB, if the total size is between 1 GB and 1 TB (unless you have Solaris 9 or older, where the -h switch was not supported, as far as I remember).
# 4  
du -sh /*/projectname
du: illegal option -- h
usage: du [-a][-d][-k][-r][-o|-s][-L] [file ...]

---------- Post updated at 02:08 AM ---------- Previous update was at 02:07 AM ----------

i have solaris8
# 5  
Code:
du -sk /yourpath | awk '{print $1 / 1048576 ,"gb"}'

# 6  
#du -sk /*/abumadi | awk '{print $1 / 1048576 ,"gb"}'
0.0183535 gb
0.00887299 gb
0 gb
0.335236 gb
0.0875254 gb

where is total ?????????????????
# 7  
Code:
du -sk /*/projectname | awk '{SUM += $1  } END {print SUM / 1048576}'

Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #688
Difficulty: Medium
The first computer to implement architectures enabling reverse Polish notation (RPN) was the Apple I computer.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Display total hard disk size?

Hi, Using Redhat, how do I display total hard disk size? I know how to do that in Solaris, you can type, format. It will show how big the disks are. This is what I did so for. $ df -t ext3 -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 ... (1 Reply)
Discussion started by: samnyc
1 Replies

2. UNIX for Dummies Questions & Answers

Command for total number of files (and size) across subdirectories?

Hi all... I have a directory called dbrn. This directory contains an unknown number of subdirectories which in turn contain an unknown number of files. What I want to know is: How many files with extention .ABC can be found in /dbrn across all subdirecties, and what is the total size for... (9 Replies)
Discussion started by: Beun
9 Replies

3. Shell Programming and Scripting

Use Awk and Array to get total size of files

Hello all, I need to do scripts total up the size in selected extension file for example motion.mov and segmentation.avi is in Label Media. For file info.doc and calc.xls in Label Document. I need output will be like this: count 1 Media,,2 GB count 2 Document,,4 GB My problem is,... (16 Replies)
Discussion started by: sheikh76
16 Replies

4. UNIX for Dummies Questions & Answers

get total size of files

as we use du - sh *.frm In This command It will show the list of files and size But I want the Total size that these files in directory with extension .frm How can we do This (6 Replies)
Discussion started by: kaushik02018
6 Replies

5. UNIX for Dummies Questions & Answers

I am trying to get the total size of a folder?

I am trying to get the total size of the folder using the below command but its not working. any ideas? du -bc <foldername>/|grep total|tr -s " "|cut -d" " -f1 the output i am getting is 78996 total but i just want it to be as 78996 please help (3 Replies)
Discussion started by: classic
3 Replies

6. Shell Programming and Scripting

total size

I have a directory that contains files like aaa-2010-05-30.txt ddd-2010-05-30.txt www-2010-05-30.txt i have total 2000 files, i need to calculate total size of files for *2010-05-30.txt like aaa-2010-05-30.txt 200MB ddd-2010-05-30.txt 10GB www-2010-05-30.txt 4GB Total 14.2 GB... (5 Replies)
Discussion started by: learnbash
5 Replies

7. UNIX for Dummies Questions & Answers

Find total size for some files?

Hi, I'm newbie to Unix. I'd like to count the total size of those files in my directory by date. For example, files on this period 05/01/08 - 05/31/08. If possible can we count by byte instead of kb. if I use $ du - ks , it will add up all files in the dir. thanks, Helen (5 Replies)
Discussion started by: helen008
5 Replies

8. UNIX for Dummies Questions & Answers

Total file size of a subset list

Hello! I'm trying to find out the total file size of a subset list in a directory. For example, I do not need to know the total file size of all the files in a directory, but I need to know what the total size is of say, "ls -l *FEB08*" in a directory. Is there any easy way of doing this? ... (3 Replies)
Discussion started by: tekster757
3 Replies

9. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

10. HP-UX

total size taken by directory

HI ALL, i am a beginner in unix world. can anyone please tell me the way to find total size taken by each directory (including size of all subdirectories and files) present under /var. e.g what is space occupied by /var/adm , /var/admin etc. its a simple question but still i dont know the... (2 Replies)
Discussion started by: jyoti
2 Replies