Dear community,
I've a continuos tcpdump on redhat that close the dumped file every 100000 captured packets.
To avoid disk full I would like to gzip the closed *.cap file. But how can I check if the file is currently opened by tcpdump and skip it from gzip?
Thanks!
EDIT: Just to post an example:
I have currently the following file on the trace directory:
The last file (tcpdump_continuous_20130316_184437.cap) is currently opened by tcpdunp, so my other script should run every 5 minutes and gzip only the closed *.cap files!
Last edited by Lord Spectre; 03-16-2013 at 02:50 PM..
I want to be able to lock a file for 60 minutes so that an automated monitoring program will not execute the script more that once an hour. I have never used a lock file but have heard that is what I need to use. Does anyone have any examples of how I would use this?
lock 60 filename.ksh ---?... (6 Replies)
Hi,
I want to do the foll steps:
1. Check if someone has a lock on my file1.
2. if file1 is locked by any other user
wait in a loop till another user releases lock
3. when lock released, lock file1.
4. do procesing (write) on file1.
5. processing complete. release lock on file1.
... (2 Replies)
hi Guys,
I just wondering how I can check and ensure a file is not locked by another process. I need to modify a file using sed but I need to ensure that is not being modified by another process at the same time. Thanks.
Harby. (2 Replies)
Hi,
I want to list out all files which are lock by some process.
ex- ~/critical
I want to list all files in critical directory which has been locked.
I need this very badly. Any suggestion highly appriciated.
Regards,
Ashok (1 Reply)
using OS X and the Terminal, I'd like to find all locked files in a specified directory, unlock them, and print a list of those files that were unlocked
how can I do this?
I'm familiar with chflags nouchg for unlocking one file but not familiar with unix enough to do what I'd like.
Thanks! (0 Replies)
I want to gzip a file and append the creation date to the end of the file. How can I accomplish this task. Basically they are log files which need a creation date stamp appended to make sure they do not overwrite other log files.
-jack (3 Replies)
Hi All,
I have a random test file: test.txt, size: 146
$ ll test.txt
$ 146 test.txt
Take 1:
$ cat test.txt | gzip > test.txt.gz
$ ll test.txt.gz
$ 124 test.txt.gz
Take 2:
$ gzip test.txt
$ ll test.txt.gz
$ 133 test.txt.gz
As you can see, gzipping a file and piping into gzip... (1 Reply)
I was trying to read the file to create a table in SAS and I got error as follows while I read.
Resource is write-locked by another user. File
=/usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_2015-09-29_tmp_18208.log. System Error Code =
0.
ERROR: File is in... (10 Replies)
Hi Experts,
I am beginner to shell scripting, I have a archive script which will connect to the FTP server and archive the files from FTP source location to FTP archive location.
Now the problem here is, the script working for few files and not working for few.I am facing the below error... (1 Reply)
Discussion started by: spidy
1 Replies
LEARN ABOUT DEBIAN
tk_getcapstyle
Tk_GetCapStyle(3tk) Tk Library Procedures Tk_GetCapStyle(3tk)__________________________________________________________________________________________________________________________________________________NAME
Tk_GetCapStyle, Tk_NameOfCapStyle - translate between strings and cap styles
SYNOPSIS
#include <tk.h>
int
Tk_GetCapStyle(interp, string, capPtr)
const char *
Tk_NameOfCapStyle(cap)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting.
const char *string (in) String containing name of cap style: one of "butt", "projecting", or "round".
int *capPtr (out) Pointer to location in which to store X cap style corresponding to string.
int cap (in) Cap style: one of CapButt, CapProjecting, or CapRound.
_________________________________________________________________DESCRIPTION
Tk_GetCapStyle places in *capPtr the X cap style corresponding to string. This will be one of the values CapButt, CapProjecting, or
CapRound. Cap styles are typically used in X graphics contexts to indicate how the end-points of lines should be capped. See the X docu-
mentation for information on what each style implies.
Under normal circumstances the return value is TCL_OK and interp is unused. If string does not contain a valid cap style or an abbrevia-
tion of one of these names, then an error message is stored in interp->result, TCL_ERROR is returned, and *capPtr is unmodified.
Tk_NameOfCapStyle is the logical inverse of Tk_GetCapStyle. Given a cap style such as CapButt it returns a statically-allocated string
corresponding to cap. If cap is not a legal cap style, then "unknown cap style" is returned.
KEYWORDS
butt, cap style, projecting, round
TkTk_GetCapStyle(3tk)