Put a set -x at the top of the script and run it in a terminal window to see what it is doing, a sleep of some period just before the done might be advisable (say 3 seconds?)
If the set -x spits out too much on the screen then put:
before the if line and put:
before the actual copy line instead of using set -x.
To run it as a daemon from within a terminal window you can do:
Hi All,
I have a situation where I need to copy the files having the latest date.
For example I have a file by name bas100e1_jun05. I need to copy it to bas100e1. But when a file by name bas100e1_jul05 is put in the same directory the script should copy the file having the latest month which... (34 Replies)
Hi,
I have a problem.
I have some text files in a folder. The names can be like:
emp_20080307053015.dat
emp_20080306053015.dat
emp_20080305053015.dat
emp_20080304053015.dat
The date format appended is like yyyymmdd and timestamp.
What i need is i have to copy the latest file every... (3 Replies)
Hi,
I have a problem.
I have some text files in a folder. The names can be like:
emp_20080307053015.dat
emp_20080306053015.dat
emp_20080305053015.dat
emp_20080304053015.dat
The date format appended is like yyyymmdd and timestamp.
What i need is i have to copy the latest file every... (12 Replies)
Hi all,
I have a folder '/samplefolder' in which i have some files like data0.txt, data1.txt and data2.txt.
I have to search the folder for existence of the file data0.txt first and if found have to copy it to some other file; next i have to search the folder for existence of file... (5 Replies)
#!/bin/bash
for i in {1..1536..1}
do
#find /home/test/Desktop/up111/workplace/Malware/$i/logs
for a in /home/test/Desktop/up111/workplace/Malware/$i/logs/*
do
#max=a
for b in /home/test/Desktop/up111/workplace/Malware/$i/logs/*
do
... (4 Replies)
Hi All,
One job in unix server will generate .csv files daily. I need to copy the latest of these .csv file from the unix server to the shared drive/folder in windows through unix script. My shared folder will look something like
W:\some folder(for example). Could any one of you please help... (3 Replies)
In linux.. In a directory there are 3 files which I want to copy only the latest file (ls -ltr myfiles*.txt|tail -1) to other directory in perl?
Could anyone please help me with the code?
Regards,
J (1 Reply)
I need to routinely cp a file out of the highest incremented folder named PROD_2_6.1_xxx where xxx (3 numerical values) is incremented only once a night starting at 100 and ending 999 over a period of time. I am not worried about copying a subset of a complete file while it is being created by some... (5 Replies)
HI Guys,
Can anyone help me to retrieve the latest file from below example using SFTP
I have below list of files in a folder
v403t.lstprgms.sortin1
val027.d099.fwest.oct2711
xcelrptd.d1400sqp.dec1713.t040459.@02del
xcelrptd.d1400sqp.dec1713.t073308.@02del... (3 Replies)
Discussion started by: heye18
3 Replies
LEARN ABOUT HPUX
nohup
nohup(1) General Commands Manual nohup(1)NAME
nohup - run a command immune to hangups
SYNOPSIS
command [arguments]
DESCRIPTION
executes command with hangups and quits ignored. If output is not redirected by the user, both standard output and standard error are sent
to If is not writable in the current directory, output is redirected to otherwise, fails. If a file is created, the file's permission bits
will be set to
If output from is redirected to a terminal, or is not redirected at all, the output is sent to
EXTERNAL INFLUENCES
Environment Variables
determines the language in which messages are displayed.
If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari-
able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of
If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
It is frequently desirable to apply to pipelines or lists of commands. This can be done only by placing pipelines and command lists in a
single file, called a shell script. To run the script using
features apply to the entire contents of file. If the shell script file is to be executed often, the need to type can be eliminated by
setting execute permission on file. The script can also be run in the background with interrupts ignored (see sh(1)):
file typically contains normal keyboard command sequences that one would want to continue running in case the terminal disconnects, such
as:
WARNINGS
Be careful to place punctuation properly. For example, in the command form:
applies only to command1. To correct the problem, use the command form:
Be careful of where standard error is redirected. The following command may put error messages on tape, making it unreadable:
whereas
puts the error messages into file
EXIT STATUS
The following exit values are returned:
The command specified by
command was found but could not be invoked
An error occurred in the nohup utility or the specified
command could not be found
Otherwise, the exit status of nohup will be that of the command specified.
SEE ALSO chmod(1), nice(1), sh(1), signal(5).
STANDARDS CONFORMANCE nohup(1)