02-08-2007
comparing shadow files with real files
Hi
I need to compare shadow file sizes with their real file counterparts. If the shadow file size differs form the realfile size then it must send a mail. My problem is that our system has over 1600 shadowfiles in different directories, with different names. the only consistancy is the .sh file ext for shadowfiles.
Any easy way of doing this ?
Thanx
Terry
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to find all files in a directory whose name has a real number larger then the number I am looking for.
For example:
.
|-- delta.1.5.sql
|-- delta.2.1.sql
|-- delta.2.2.sql
|-- delta.2.3.sql
|-- delta.2.4.sql
`-- delta.2.5.sql
I know my database is at 2.2 so I want an... (2 Replies)
Discussion started by: harmonwood
2 Replies
2. Shell Programming and Scripting
Hi
I am having two files...
x1
709545
709546
709547
and
x2
709545
709545
709545
the output should be
709546
709547
pls help (2 Replies)
Discussion started by: suryanarayana
2 Replies
3. Shell Programming and Scripting
So I have two files:
File1
pictures.txt 1.1 1.3
dance.txt 1.2 1.4
treehouse.txt 1.3 1.5
File2
pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244
dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2 ref4948 1.1
treehouse.txt 1.6 ref8573 1.5 ref3284 1.4 ref5838... (24 Replies)
Discussion started by: linuxkid
24 Replies
4. Solaris
Hi
I was trying to create files to be used as discs for asm configuration. I used the following steps
mkdir -p /u02/asmdisks
dd if=/dev/zero of=/u02/asmdisks/disk0 bs=1024k count=1000
dd if=/dev/zero of=/u02/asmdisks/disk1 bs=1024k count=1000
chown -R oracle:dba /u02/asmdisks
chmod... (1 Reply)
Discussion started by: malikshahid85
1 Replies
5. Shell Programming and Scripting
Hi,
On the server, we have app log files in this location /app/logs/error.log
On the same server, in a real time, we would like to replicate that into /var/ directory.
if someone has already done this, please share the script.
Thanks in advance. (4 Replies)
Discussion started by: lookinginfo
4 Replies
6. Shell Programming and Scripting
I've two files with data like below:
file1.txt:
AAA,Apples,123
BBB,Bananas,124
CCC,Carrot,125
file2.txt:
Store1|AAA|123|11
Store2|BBB|124|23
Store3|CCC|125|57
Store4|DDD|126|38
So,the field separator in file1.txt is a comma and in file2.txt,it is |
Now,the output should be... (2 Replies)
Discussion started by: asyed
2 Replies
7. Solaris
Hi all..
I moved the /etc/shadow and /etc/shadow files to /tmp and then rebooted my PARC machine running 5.10. I did it to see if I could recover from single user mode.
But, I forgot to enable the abort key-sequence which I earlier disabled.
Stuck!
One of my gurus told I had to... (9 Replies)
Discussion started by: satish51392111
9 Replies
8. UNIX for Advanced & Expert Users
Hi Guys ,
we have one directory ...in that directory all files will be set on each day..
files must have header ,contents ,footer..
i wants to compare the header,contents,footer ..if its same means display an error message as 'files contents same' (7 Replies)
Discussion started by: Venkatesh1
7 Replies
9. Shell Programming and Scripting
I hope I can explain this correctly. I am using Bash-4.2 for my shell.
I have a group of file names held in an array. I want to compare the names in this array against the names of files currently present in a directory. If the file does not exist in the directory, that is not a problem.... (5 Replies)
Discussion started by: BudMan
5 Replies
10. UNIX for Beginners Questions & Answers
I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ?
Source File
*************
# file: /local/test_1
# owner: own
#... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
LEARN ABOUT XFREE86
lndir
LNDIR(1) General Commands Manual LNDIR(1)
NAME
lndir - create a shadow directory of symbolic links to another directory tree
SYNOPSIS
lndir [ options ] fromdir [ todir ]
DESCRIPTION
The lndir program makes a shadow copy todir of a directory tree fromdir, except that the shadow is not populated with real files but
instead with symbolic 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
mounted from a remote machine. You can build in the shadow tree, and 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 scheme 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 all shadow directories are symlinks to the real thing: just cd to the shadow directory and recompile away.
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).
If you add files, simply run lndir again. New files will be silently added. Old files will be checked that they have the correct link.
Deleting files is a more painful problem; the symlinks will just point into never-never land.
OPTIONS
-silent
Normally lndir outputs the name of each subdirectory as it descends into it. The -silent option suppresses these status messages.
-silent may be abbreviated to -s.
-ignorelinks
If a file in fromdir is a symbolic link, lndir will make the same link in todir rather than making a link back to the (symbolic
link) entry in fromdir. The -ignorelinks option changes this behavior. The link created in todir will point back to the corre-
sponding (symbolic link) file in fromdir. If the link is to a directory, this is almost certainly the wrong thing. The -ignore-
links option may be abbreviated to -i.
-withsymdirs
If a file in fromdir is a symbolic link to a directory and the -withsymdirs option is specified, lndir will shadow the directory
tree the symbolic link points to, whether or not the -ignorelinks is also specified. The -withsymdirs option may be abbreviated to
-d.
-clean lndir will remove dangling symbolic links and empty directories in the shadow tree. The -clean option may be abbreviated to -c.
-cleanonly
lndir will do the cleaning phase only, not creating the shadow tree. The todir argument may be provided, and defaults to the cur-
rent directory when not provided.
-withrevinfo
lndir will normally not shadow any BitKeeper, RCS, SCCS, CVS, CVS.adm and .svn subdirectories, nor any .cvsignore and .gitignore
files. This option causes these directories and files to be treated as any other, rather than ignored. -withrevinfo may be short-
ened to -r.
-noexceptions
By default, lndir does not shadow files or directories whose name is .DS_Store, or ._.DS_Store, or starts with '.#', or ends in '~'.
This option, which may be abbreviated to -E, causes such files to also be shadowed.
-except
This option adds name to an initially empty list of filenames in fromdir that are not to be shadowed. -except may be specified as
-e. This option may be repeated as many times as necessary.
DIAGNOSTICS
The program displays the name of each subdirectory it enters, followed by a colon. The -silent option suppresses these messages.
A warning message is displayed if the symbolic link cannot be created. The usual problem is that a regular file of the same name already
exists.
If the link already exists but doesn't point to the correct file, the program prints the link name and the location to which it does point.
XFree86 Version 4.7.0 LNDIR(1)