06-24-2005
hi,
how abt this
while [ 1 ]
do
if [ ! -f <filename> ]
then
touch <filename>.log
fi
sleep 15
done
-------------------
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
Is anybody can help me to get the file creation date with seconds?
-rw-r--r-- 1 opsc system 422550845 Aug 22 15:41 StatData.20020821
Thanks in advance
Krishna (7 Replies)
Discussion started by: krishna
7 Replies
2. Shell Programming and Scripting
Greetings, I just started using scripting languages,
im trying to get a tcpdump in a file, change the
file name every 5mins ... this is what i have but its
not working ... any suggestions?
#!/bin/bash
# timeout.sh
#timestamp format
TIMESTAMP=`date -u "+%Y%m%dT%H%M%S"`
#tdump =`tcpdump... (3 Replies)
Discussion started by: livewire
3 Replies
3. Shell Programming and Scripting
Is there a command (like ls -l) to get the file time stamp including seconds? The ls -l gives only the HH:MM, No SS
I don't have a C compiler to call stat()
I don't a command like stat too.
Please help. (8 Replies)
Discussion started by: firdousamir
8 Replies
4. Shell Programming and Scripting
shell: #!/bin/ash
I searched and found a few relevant posts (here and here - both by porter, on the same day (?)) however both are just a do while loop, I need to check a file date and compare it to the current time.
I would like it to say if file 'test' is more than 12 hours old than "right... (3 Replies)
Discussion started by: phdeez
3 Replies
5. Shell Programming and Scripting
guys I need emergency help with below shell script assignment..am new to shell script
Write a Shell script to automatically check that a specified user is logged in to the
computer.
The program should allow the person running the script to specify the name of the
user to be checked, the... (2 Replies)
Discussion started by: gurmad
2 Replies
6. Shell Programming and Scripting
Hi All,
Cany any one help me in solving this..
Problem statement: I have a requirement to find the time from which there are no files created in a given directory. For this I am assuming that I need to get the file creation time in seconds, then the current time in seconds using `date +%s`.... (7 Replies)
Discussion started by: chary
7 Replies
7. UNIX for Advanced & Expert Users
Hi ,
How can I get the last access time of a file upto the precesion of seconds in Unix.
I cannot use stat as this is not supported. (10 Replies)
Discussion started by: kanus
10 Replies
8. Programming
Hi all,
I'm after some help with this small issue which i'm struggling to work out a fix for.
I have a file that contains records that all have a time stamp for each individual record, i need to search the file for a specific time stamp and then search back 10 seconds to see if the number... (2 Replies)
Discussion started by: sp3arsy
2 Replies
9. Red Hat
how to verify that the following is epoch time.
that is if i have given some random value like 34600 , how can i know it is
epoch seconds (5 Replies)
Discussion started by: ramsavi
5 Replies
10. AIX
I have to list the files of particular directory using file filter like find -name abc* something and if multiple file exist I also want time of each file up to seconds.
Currently we are getting time up to minutes in AIX is there any way I can get file last modification time up to seconds. (4 Replies)
Discussion started by: Nitesh sahu
4 Replies
LEARN ABOUT OPENSOLARIS
script
script(1) User Commands script(1)
NAME
script - make record of a terminal session
SYNOPSIS
script [-a] [filename]
DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the
record is saved in the file typescript. See WARNINGS.
The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends
when the forked shell exits or when Control-d is typed.
OPTIONS
The following option is supported:
-a Appends the session record to filename, rather than overwriting it.
NOTES
script places everything that appears on the screen in filename, including prompts.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a
privileged user, that is, root. Be sure that typescript is not a link before running script.
SunOS 5.11 30 Jan 2004 script(1)