Hi all,
I've got a problem, what function do i use to list the contents of all the directory tree (simular to "find")? Any other suggestions?
Thank you all (3 Replies)
Can someone tell me how I can determine how much space (blocks) have been used by a given directory tree?
I periodically need to know how much space is consumed by a directory and all of its files and subdirectories and their files in either KB or blocks. I have tried df and du but these do not... (1 Reply)
hi i have modified a program to display directory entries recursively in a tree like form
i need an output with the following guidelines:
the prog displays the contents of the directory
the directory contents are sorted before printing so that directories come before regular files
if an entry... (2 Replies)
I'm currently trying to write a script that will do the following:
search a given directory tree for a file with MMDDYYYY in the name.
delete those files only.
I can't figure out how to make the script delete the files with the MMDDYYYY in the filename after finding them.
Should I export... (7 Replies)
All,
I am new to Unix scripting ans was looking for some guidance.
I basically have to:
1. Check if a directory exists - if not create it
2. Check the permissions of the dir - if Wrong change
loop this.
Sort of creating a directory tree.
Thanks. (2 Replies)
Hi all,
The following is a script for displaying directory tree.
D=${1:-`pwd`}
(cd $D; pwd)
find $D -type d -print | sort |
sed -e "s,^$D,,"\
-e "/^$/d"\
-e "s,*/\(*\)$,\:-----\1,"\
-e "s,*/,: ,g" | more
exit 0
I am trying to understand the above script.But... (3 Replies)
Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management.
Thanks in advance-
Brian- (2 Replies)
To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Hi friends,
Hello again :)
i got stuck in problem. Is there any way to get a special directory from directory tree?
Here is my problm.." Suppose i have one fix directory structure "/abc/xyz/pqr/"(this will be fix).Under this directory structure i have some other directory and... (6 Replies)
Hello Everyone,
I need to find the file / directory with the maximum timestamp in a directory tree having many files / directories.
Could you please help.
Thanks,
H squared (3 Replies)
Discussion started by: H squared
3 Replies
LEARN ABOUT OSF1
lndir
lndir(1X)lndir(1X)NAME
lndir - create a shadow directory of symbolic links to another directory tree
SYNOPSIS
lndir fromdir [todir]
DESCRIPTION
lndir makes a shadow copy todir of a directory tree fromdir, except that the shadow is not populated with real files but instead with sym-
bolic links pointing at the real files in the fromdir directory tree. This is usually useful for maintaining source code for different
machine architectures. You create a shadow directory containing links to the real source which you will have usually NFS mounted from a
machine of a different architecture, and then recompile it. The object files will be in the shadow directory, while the source files in
the shadow directory are just symlinks to the real files.
This has the advantage that if you update the source, you need not propagate the change to the other architectures by hand, since all
source in shadow directories are symlinks to the real thing: just cd to the shadow directory and recompile.
The todir argument is optional and defaults to the current directory. The fromdir argument may be relative (e.g., ../src) and is relative
to todir (not the current directory).
Note that RCS, SCCS, and CVS.adm directories are not shadowed.
Note also that if you add files, you must run lndir again. Deleting files is difficult because the symlinks will point to places that no
longer exist.
BUGS
The patch routine needs to be able to change the files. You should never run patch from a shadow directory.
Use a command like the following to clear out all files before you can relink (if the fromdir has been moved, for instance):
find todir -type l -print | xargs rm
The following command will find all files that are not directories:
find . ! -type d -print
lndir(1X)