That worked fine, but I was actually asking about doing something like listing only directories
i.e.: I use on /
Code:
du -ms * | sort
and that shows me a list of all directories (-s) in the / filesystem. The matter is that I may have many filesystems mounted over /, which are shown as a normal directory. Now, I don't want to list all those mount points over / (like /usr, /var, and any other fs), only normal directories created on /.
Is it possible to do that?
I apologize for my English, I hope you have understood.
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)
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)
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)
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)
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)
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)
#!/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)
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)
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)
.... 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
LEARN ABOUT NETBSD
mount_union
MOUNT_UNION(8) BSD System Manager's Manual MOUNT_UNION(8)NAME
mount_union -- mount union filesystems
SYNOPSIS
mount_union [-b] [-o options] directory uniondir
DESCRIPTION
The mount_union command attaches directory above uniondir in such a way that the contents of both directory trees remain visible. By
default, directory becomes the upper layer and uniondir becomes the lower layer.
Both directory and uniondir are converted to absolute paths before use.
The options are as follows:
-b Invert the default position, so that directory becomes the lower layer and uniondir becomes the upper layer. However, uniondir
remains the mount point.
-o Options are specified with a -o flag followed by a comma separated string of options. See the mount(8) man page for possible options
and their meanings.
Filenames are looked up in the upper layer and then in the lower layer. If a directory is found in the lower layer, and there is no entry in
the upper layer, then a shadow directory will be created in the upper layer. It will be owned by the user who originally did the union
mount, with mode "rwxrwxrwx" (0777) modified by the umask in effect at that time.
If a file exists in the upper layer then there is no way to access a file with the same name in the lower layer. If necessary, a combination
of loopback and union mounts can be made which will still allow the lower files to be accessed by a different pathname.
Except in the case of a directory, access to an object is granted via the normal filesystem access checks. For directories, the current user
must have access to both the upper and lower directories (should they both exist).
Requests to create or modify objects in uniondir are passed to the upper layer with the exception of a few special cases. An attempt to open
for writing a file which exists in the lower layer causes a copy of the entire file to be made to the upper layer, and then for the upper
layer copy to be opened. Similarly, an attempt to truncate a lower layer file to zero length causes an empty file to be created in the upper
layer. Any other operation which would ultimately require modification to the lower layer fails with EROFS.
The union filesystem manipulates the namespace, rather than individual filesystems. The union operation applies recursively down the direc-
tory tree now rooted at uniondir. Thus any filesystems which are mounted under uniondir will take part in the union operation. This differs
from the union option to mount(8) which only applies the union operation to the mount point itself, and then only for lookups.
EXAMPLES
The commands
mount -t cd9660 -o ro /dev/cd0a /usr/src
mount -t union /var/obj /usr/src
mount the CD-ROM drive /dev/cd0a on /usr/src and then attaches /var/obj on top. For most purposes the effect of this is to make the source
tree appear writable even though it is stored on a CD-ROM.
The command
mount -t union -o -b /sys $HOME/sys
attaches the system source tree below the sys directory in the user's home directory. This allows individual users to make private changes
to the source, and build new kernels, without those changes becoming visible to other users. Note that the files in the lower layer remain
accessible via /sys.
SEE ALSO intro(2), mount(2), unmount(2), fstab(5), fsck_ffs(8), mount(8), mount_null(8), sysctl(8)HISTORY
The mount_union command first appeared in 4.4BSD.
BUGS
Without whiteout support from the filesystem backing the upper layer, there is no way that delete and rename operations on lower layer
objects can be done. An attempt to mount a union directory under one which does not have whiteout support will return EOPNOTSUPP ("Operation
not supported"). Whiteout support can be added to an existing FFS filesystem by using the -c option of fsck_ffs(8).
Running find(1) over a union tree has the side-effect of creating a tree of shadow directories in the upper layer.
BSD February 5, 2008 BSD