Sponsored Content
Full Discussion: du flag -x
Operating Systems AIX du flag -x Post 302353703 by pernasivam on Wednesday 16th of September 2009 02:33:33 AM
Old 09-16-2009
MySQL

Quote:
Originally Posted by Casey
Hi funksen,

Mmmh no that is not what I am actually looking for. I don't want to see the total size of the /

I'll try to give a more clear example of what I wanna do:

Code:
ls /
 
.
/
/dir1
/dir2
/dir3
/dirN
/opt
/usr
/var
/zzzdir1
...

and I want to see the total size of those directories on / which are not filesystems (that is, /dir1, /dir2, /dir3, etc, and not /usr, /var, etc.).

The output would be, for example
Code:
3.4 /dir1
6.2 /dir2
1.7 /dir3
9.0 /dirN
0.6 /zzzdir1

as in a normal

Code:
du -gs *

output, but not listing the sizes of /var, /opt, and the rest of the filesystems on /.


I hope I was clear this time, I don't know if what I want to do is even possible.

Thanks again for your answer


Regards

That means you have to use differend command.

#df -g

it will display actually what you are expecting..............
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

the flag -c in sh command

I need your help please. In a production system, i've seen many running process as follow: sh -c ./pathname/shellname what exactly the flag option -c is used for? ive tried to look at the man page, but it doesnt say much. ill appreciate yor help. Thanks (4 Replies)
Discussion started by: alexcol
4 Replies

2. Shell Programming and Scripting

find and size flag

Hello everyone, I would like to filter and search for files in my curr dir where the blocks used by those files are over a certain number (i.e. 30), when I try this command find . -name "c*" -size +30 -exec ls -ls {} \; I get a list of files, the first column is the block size, right? ... (1 Reply)
Discussion started by: gio001
1 Replies

3. AIX

Checking for flag in a subscript?

I want to incorportae a subscript in a job script which is used for loading purposes. What i require is that before a job runs it should check for a flag ,if flag is not present then create it and the loading should start. Once loading finishes it should delete the flag. So if any other load... (1 Reply)
Discussion started by: bathla
1 Replies

4. Shell Programming and Scripting

checking for a flag in a subscript?

I want to incorportae a subscript in a job script which is used for loading purposes. What i require is that before a job runs it should check for a flag ,if flag is not present then create it and the loading should start. Once loading finishes it should delete the flag. So if any other load... (2 Replies)
Discussion started by: bathla
2 Replies

5. Red Hat

-ansi flag support for g++

I have been compiling a cpp program using following command: g++ -c -ansi a.cpp with g++ version 4.1.2. I want to know the significance of the -ansi flag and which other higher g++ version supports this flag by default Dhiraj (1 Reply)
Discussion started by: dhiraj kurhade
1 Replies

6. Shell Programming and Scripting

Date Time of FLAG

Hi, I am first sorry to ask for that, but I am in trouble so I hope you will be agreed to help me on this. I am solaris (ksh). I have a lots of file but I only need to get the date and time of the flag files. Here is the "ls -lrt" view : ls -lrt | grep Flag_Saturne_R*Return ... (3 Replies)
Discussion started by: Aswex
3 Replies

7. Shell Programming and Scripting

Add the flag

#!/bin/bash while : do ./abc.sh PB sleep 60 ./abc.sh RA sleep 60 ./abc.sh GS sleep 68400 done Instead of making the script sleep for sometime, it doesn't work all the time as time may shift over a period. How to make a script wake up every 30 seconds and check the current time, if... (2 Replies)
Discussion started by: sandy1028
2 Replies

8. AIX

Flag issue

Hi all, We dont have access to aix source code and i have a doubt. The flag SC_NO_RESERVE, is it got to do anything with the failover? If the flag is set the paths are going to failed state. If flag is not set everything comes up fine after failover. Thanks in advance for helping ... (2 Replies)
Discussion started by: gnakul
2 Replies

9. UNIX for Dummies Questions & Answers

'h' flag in du

Hey, all! Why is the "human readable" flag changing the behavior of du? And while I'm at it, can you make du only look at files, not directories. I often find myself wanting to find the largest file(s) in a dir or vol. Using 'find' itself, it seems you have to at least be able to guess the size of... (2 Replies)
Discussion started by: sudon't
2 Replies

10. UNIX for Dummies Questions & Answers

Get the id with specify flag

.... means multi line ddd,bug fgdrg dfdfsdfdfsd fsdfdfdfd fdfdsfdsfsd ....... flag2 ...... aaa,bug sfsfsfsfs dfdfsdfdfsd fsdfdfdfd fdfdsfdsfsd ...... flag1 ...... ddd,bug fgdrg dfdfsdfdfsd (9 Replies)
Discussion started by: yanglei_fage
9 Replies
scandir(3)						     Library Functions Manual							scandir(3)

NAME
scandir, alphasort - Scans or sorts directory contents LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/types.h> #include <sys/dir.h> int scandir ( char *dir_name, struct dirent * (*name_list[ ]), int (*select) ( struct dirent *dir ), int (*compare) ( struct dirent **dir1, struct dirent **dir2 ) ); int alphasort ( struct dirent **dir1, struct dirent **dir2 ); PARAMETERS
Points to the directory name. Points to the array of pointers to directory entries. Points to a user-supplied function that is called by the scandir() function to select which entries to include in the array. Points to a user-supplied function that sorts the completed array. Points to a dirent structure. Points to a dirent structure. DESCRIPTION
The scandir() function reads the directory pointed to by the dir_name parameter. It then uses the malloc() function to create an array of pointers to directory entries. The scandir() function returns the number of entries in the array and, through the name_list parameter, a pointer to the array. The select parameter points to a user-supplied function that the scandir() function calls to select which entries to include in the array. The selection routine is passed a pointer to a directory entry and returns a nonzero value for a directory entry that is included in the array. If the select parameter is a null value, all directory entries are included. The compare parameter points to a user-supplied function that is passed to the qsort() function to sort the completed array. If the compare parameter is a null value, the array is not sorted. The memory allocated to the array can be deallocated by freeing each pointer in the array, and the array itself, with the free() function. The alphasort() function alphabetically compares the two dirent structures pointed to by the dir1 and dir2 parameters. This function can be passed as the compare parameter to either the scandir() function or the qsort() function. A user-supplied subroutine may also be used. RETURN VALUES
The scandir() function returns -1 if the directory cannot be opened for reading or if the malloc() function cannot allocate enough memory to hold all the data structures. If successful, the scandir() function returns the number of entries found. The alphasort() function returns the following values: Less than 0 (zero): The dirent structure pointed to by the dir1 parameter is lexi- cally less than the dirent structure pointed to by the dir2 parameter. 0 (zero): The dirent structures pointed to by the dir1 parameter and the dir2 parameter are equal. Greater than 0 (zero): The dirent structure pointed to by the dir1 parameter is lexically greater than the dirent structure pointed to by the dir2 parameter. RELATED INFORMATION
Functions: malloc(3), opendir(3), qsort(3) delim off scandir(3)
All times are GMT -4. The time now is 02:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy