Hi, the below script will search through specified directories and look for specified files. If any file is older than 10 hours a notification email will be sent.
hi,
i want to write the script to list atleast one file inside that directory
eg:
/home/Log/amp01
/home/log/amp02
.
.
.
/home/log/amp..N
want to see atleast one file inside the /home/log/amp01 .... amp(N)
if it not there.. need to give that no file exists inside... (3 Replies)
Hi,
I need to check some files in one directory whether any files has been created before 4 hours(ie, less than 4 hours from the current time).
Can anybody help me out..?
Thanks in advance..! (21 Replies)
hi,
I am having script in which i want to check if directory has any file in it or not. If directory contains a single or more files then and only then it should proceed to further operations...
P.S.: Directory might have thousand number of files. so there might be chance of getting error... (4 Replies)
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Hi all,
i am getting the file through sftp from a location in the name of 20141201_file.txt (iam getting the file on daily basis with date appended at the beginning)
so before going to my actual process ,i want to check whether today files and yesterday file are same or not(which i used to... (3 Replies)
Hi Experts,
I am not good in writing script. Just stared.I am looking for shell script to check following parameters.
1) Number of files on remote Linux SUSE server.- Any directory and sub directory.
2) I should define number of files in script. Files should be variable.
3) Age of... (2 Replies)
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
I have a objective of Sending email if latest file in a directory(excluding files of sub-dirs) is older than 2 hours.
eg : ls -ltr
drwx--x--x 2 abcde abc 256 2017-02-07 20:10 Mail
-rw-rw-r-- 1 abcde abc 1170 2017-02-24 17:30 test
-rw-rw-r-- 1 abcde abc 356 2017-03-09 18:00 xyz.csv... (3 Replies)
I'm required to write a simple shell script that when it runs it writes the output which is a simple barcode to a tmp flat file which I can do the bit I'm struggling with...
The next time it runs I need to check the tmp output file to see if that barcode is in the output file and if it is send... (5 Replies)
Discussion started by: worky
5 Replies
LEARN ABOUT V7
at
AT(1) General Commands Manual AT(1)NAME
at - execute commands at a later time
SYNOPSIS
at time [ day ] [ file ]
DESCRIPTION
At squirrels away a copy of the named file (standard input default) to be used as input to sh(1) at a specified later time. A cd(1) com-
mand to the current directory is inserted at the beginning, followed by assignments to all environment variables. When the script is run,
it uses the user and group ID of the creator of the copy file.
The time is 1 to 4 digits, with an optional following `A', `P', `N' or `M' for AM, PM, noon or midnight. One and two digit numbers are
taken to be hours, three and four digits to be hours and minutes. If no letters follow the digits, a 24 hour clock time is understood.
The optional day is either (1) a month name followed by a day number, or (2) a day of the week; if the word `week' follows invocation is
moved seven days further off. Names of months and days may be recognizably truncated. Examples of legitimate commands are
at 8am jan 24
at 1530 fr week
At programs are executed by periodic execution of the command /usr/lib/atrun from cron(8). The granularity of at depends upon how often
atrun is executed.
Standard output or error output is lost unless redirected.
FILES
/usr/spool/at/yy.ddd.hhhh.uu
activity to be performed at hour hhhh of year day ddd of year yy. uu is a unique number.
/usr/spool/at/lasttimedone contains hhhh for last hour of activity.
/usr/spool/at/past directory of activities now in progress
/usr/lib/atrun program that executes activities that are due
pwd(1)SEE ALSO calendar(1), cron(8)DIAGNOSTICS
Complains about various syntax errors and times out of range.
BUGS
Due to the granularity of the execution of /usr/lib/atrun, there may be bugs in scheduling things almost exactly 24 hours into the future.
AT(1)