Sponsored Content
Top Forums Shell Programming and Scripting Script to list changes in Directories Post 43759 by aojmoj on Friday 21st of November 2003 01:51:24 PM
Old 11-21-2003
Error Script to list changes in Directories

Hello guys it's me again, I need some help. What I'm doing is listing all the file and directories Recusively and using it a a master file. Then I need to do the same the nest day to make sure nothing was deleted or modified. What happen is file in one of out major directories was deleted without anyone knowing, So I'm trying to write a script so that next time we will be on top of it.
Plus I need to have the deleted and modified files put into some kinda report.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help with script to list directories

Hi All I have two scripts which i used to try and list all the directories one using 'function', which only lists the first directory and does not show directories within directories. function ListDir () { for arg in $(ls $HOME) do if then echo $arg ... (2 Replies)
Discussion started by: chassis
2 Replies

2. Shell Programming and Scripting

a remove script taken in input a file which contain a list of directories

Hi, I'm looking to delete some files from directories. I've just put in a file the location of these files. e.g: in file supprs.txt there is: /usr/host/t1.txt /etc/dev/u1.java /home/new/files/view.c Is it possible to take this file "supprs.txt" as a parameter in a shell command ? (2 Replies)
Discussion started by: yeclota
2 Replies

3. Shell Programming and Scripting

Script for parsing directories one level and finding directories older than n days

Hello all, Here's the deal...I have one directory with many subdirs and files. What I want to find out is who is keeping old files and directories...say files and dirs that they didn't use since a number of n days, only one level under the initial dir. Output to a file. A script for... (5 Replies)
Discussion started by: ejianu
5 Replies

4. Shell Programming and Scripting

Backup script: Copying and removing directories based on list

I am writing a simple backup script, but I cannot figure out how to remove directories that are found in a list. For example: DONT_COPY=" .adobe/ .bin/google-earth " tar -zcvf - * --exclude=$DONT_COPY | openssl des3 -salt -k $1 | dd of=$(hostname)-$(date +%Y%m%d).tbz > COPIED Note that... (4 Replies)
Discussion started by: dotancohen
4 Replies

5. Shell Programming and Scripting

How to list all the directories, sub directories in a mount along with size in ascending order?

Hi , I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In a particular mount, have to list all the directories and sub directories along with size of the directory and sub directory in ascending order. Please help me in this regard and many... (4 Replies)
Discussion started by: nmakkena
4 Replies

6. UNIX for Dummies Questions & Answers

List directories and sub directories recursively excluding files

Hi, Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process. I wanted to disply using a unix command all the directories recursively excluding files. I tried 'ls -FR' but that display files as... (3 Replies)
Discussion started by: pointers
3 Replies

7. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

8. Shell Programming and Scripting

Chose list of sub directories in a bash script file

Hi, I have a command in my bash script, searchDirectoryName.sh: DIR_NAME=$(find . -type d) echo "${DIR_NAME}" . ./Dir1 ./Dir1/1.0.2.1 ./Dir2 ./Dir2/1.1 ./Dir3 ./Dir3/2.2.1 How can I select only following directory names with second subdirectoies and without first ./ in the... (3 Replies)
Discussion started by: hce
3 Replies

9. UNIX for Dummies Questions & Answers

List the directories, having given pattern in the directories name, sorted by creation date

It is for HP-Unix B.11.31. Requirement: 1. List the directories, having given pattern in the directories name, sorted by creation date. Example: Directories with name "pkg32*" or "pkg33*" 2. On the output of 1. list the directories by creation date as sort order, with creation date... (2 Replies)
Discussion started by: Siva SQL
2 Replies

10. Shell Programming and Scripting

Need Help in ksh Script to list files older than 365 days from specified directories

Requirement is to list the files older than 365 days from multiple directories and delete them and log the list of files which are deleted to a log file. so 1 script should only list files older than 365 days for each directory separately to a folder The other script should read these files... (7 Replies)
Discussion started by: prasadn
7 Replies
ypxfr(1M)						  System Administration Commands						 ypxfr(1M)

NAME
ypxfr, ypxfr_1perday, ypxfr_1perhour, ypxfr_2perday - transfer NIS map from a NIS server to host SYNOPSIS
/usr/lib/netsvc/yp/ypxfr [-c] [-f] [ -C tid prog server] [-d ypdomain] [-h host] [-s ypdomain] mapname DESCRIPTION
The ypxfr command moves an NIS map in the default domain for the local host to the local host by making use of normal NIS services. It creates a temporary map in the directory /var/yp/ypdomain (this directory must already exist; ypdomain is the default domain for the local host), fills it by enumerating the map's entries, fetches the map parameters (master and order number), and loads them. It then deletes any old versions of the map and moves the temporary map to the real name. If run interactively, ypxfr writes its output to the terminal. However, if it is started without a controlling terminal, and if the log file /var/yp/ypxfr.log exists, it appends all its output to that file. Since ypxfr is most often run from the privileged user's crontab file, or by ypserv, the log file can retain a record of what was attempted, and what the results were. For consistency between servers, ypxfr should be run periodically for every map in the NIS data base. Different maps change at different rates: a map might not change for months at a time, for instance, and can therefore be checked only once a day. Some maps might change sev- eral times per day. In such a case, you might want to check hourly for updates. A crontab(1) entry can be used to automatically perform periodic updates. Rather than having a separate crontab entry for each map, you can group commands to update several maps in a shell script. Examples (mnemonically named) are in /usr/sbin/yp: ypxfr_1perday, ypxfr_2perday, and ypxfr_1perhour. Refer to ypfiles(4) for an overview of the NIS name service. OPTIONS
-c Do not send a "Clear current map" request to the local ypserv process. Use this flag if ypserv is not running locally at the time you are running ypxfr. Otherwise, ypxfr complains that it cannot communicate with the local ypserv, and the transfer fails. -f Force the transfer to occur even if the version at the master is not more recent than the local version. -C tid prog server This option is for use only by ypserv. When ypserv starts ypxfr, it specifies that ypxfr should call back a yppush process at the host server, registered as program number prog, and waiting for a response to transaction tid. -d ypdomain Specify a domain other than the default domain. -h host Get the map from host, regardless of the master. If host is not specified, ypxfr asks the NIS service for the name of the master, and tries to get the map from there. host must be a valid host name. -s ypdomain Specify a source domain from which to transfer a map that should be the same across domains. FILES
/var/yp/ypxfr.log Log file /usr/lib/netsvc/yp/ypxfr_1perday Script to run one transfer per day, for use with cron(1M) /usr/lib/netsvc/yp/ypxfr_2perday Script to run two transfer per day, for use with cron(1M) /usr/lib/netsvc/yp/ypxfr_1perhour Script for hourly transfers of volatile maps /var/yp/ypdomain NIS domain /usr/spool/cron/crontabs/root Privileged user's crontab file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: ypxfr Only +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ ypxfr_1perday, ypxfr_1perhour, and ypxfr_2perday +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWypu | +-----------------------------+-----------------------------+ SEE ALSO
crontab(1), cron(1M), ypinit(1M), yppush(1M), ypserv(1M), ypfiles(4), attributes(5) SunOS 5.10 11 Mar 1998 ypxfr(1M)
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy