Hi, everybody
I want to know hot to watch changes on a dir, for example if someone changes a file inside it, with an script. I've tried using md5sum and then diff, sadly with no success.
I use md5sum for single files, but doesn't work for directories. The idea is take a snapshot with md5sum,... (4 Replies)
I'm rusty with unix admin, and I was just informed by a peer in another city that I need to watch my unix log files for size, but she never told me which ones to watch - and of course, now she's gone for two weeks! I am using Sco OpenServer 5.5 (I believe), can anyone tip me off on the trouble log... (3 Replies)
Hi all,
This is actually more for my lazyness then anything else, but I think others might find it useful to use as well. Basically this is what I am trying to achieve...
In my ubuntu home dir under Downloads is where firefox saves everything by default, now I know that you can manually... (3 Replies)
Hi all,
How can I do a ksh script to watch a log file for 2 specific alarms that have one this string : "Connection Error" and the other one: "Failure in sending". I would like to watch for these two alarms in the log and then if each of them repeats for about 30 times to go kill 2 processes.
... (1 Reply)
I want to backup all the directory tress, including hidden directories, without copying any files.
find . -type d gives the perfect list.
When I tried tar, it won't work for me because it tars all the files.
find . -type d | xargs tar -cvf a.tar
So i tried rsync.
On my own test box, the... (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)
I dont know if this possible. I need to watch a directory and if any file gets appeneded with a particular entry say, nologin.php, we should get output of that. (1 Reply)
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Given a directory containing say a few thousand files,
please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents.
func(a_directory_name) output -> {“matches”: , ... ]}
e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies
LEARN ABOUT FREEBSD
watch
WATCH(8) BSD System Manager's Manual WATCH(8)NAME
watch -- snoop on another tty line
SYNOPSIS
watch [-cinotW] [-f snpdev] [tty]
DESCRIPTION
The watch utility allows the user to examine all data coming through a specified tty using the snp(4) device. If the snp(4) device is not
available, watch will attempt to load the module (snp). The watch utility writes to standard output.
The options are as follows:
-c Reconnect on close. If the tty observed by watch is closed, automatically reattach to the same tty. If this option is not speci-
fied, watch will request a new tty if running in interactive mode or exit if running without a controlling tty.
-f snpdev
If this option is specified, watch will use snpdev as the snp(4) device. Without this option, watch will attempt to find the next
available snp(4) device.
-i Force interactive mode. Interactive mode is a default if watch is started from a tty. If output is redirected to a file, interac-
tive mode can still be requested by specifying this option.
-n Disable the ability to switch the watched tty interactively. This disables both change requests made with <control-X> as well as
automatic prompting when the current tty is closed or overflows. In all cases where a prompt would be displayed, watch will exit.
The reconnect flags are unaffected by this option. When this flag is used, <control-X> is passed through to the terminal.
-o Reconnect on overflow. The behavior of watch if the observed tty overflows is similar to the behavior if the observed tty is closed.
For more info see snp(4).
-t Print the date and time when observation of a given tty is started.
-W Allow write access to observed tty.
tty Tty may be specified as a tty-style device, such as a pseudo tty device, a virtual console, or a serial line, etc. Names may be pre-
ceded by /dev/.
OPERATION
While running in interactive mode, all user input is discarded except for:
<control-G>
Exit watch.
<control-W>
Clear screen.
<control-X>
Change attached tty, unless this feature is disabled, in which case control-X is passed to the terminal as with other control charac-
ters.
SEE ALSO pty(4), sio(4), snp(4), kldload(8)HISTORY
The watch utility first appeared in FreeBSD 2.1.
AUTHORS
Ugen J.S. Antsilevich <ugen@NetVision.net.il>
BUGS
No terminal emulation is performed. All user output is reproduced as-is.
BSD November 24, 2001 BSD