Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi all,
I have this text file containing 9 columns separated by space. The 8th columns contains the numbers.
C1 C2 C3 C4 C5 C6 C7 C8 C9
er rt yt gh iu nk il 0.07 xs
yt lr ty bg iu zk nh 0,0005 lt
...etc.
I want to replace the comma with full stop only in 8th coloumn.
the output... (8 Replies)
mail:/var/lib/named/proc # ls -l |grep kcore
-r-------- 1 root root 140737486266368 Jun 3 19:47 kcore
mail:/var/lib/named/proc # du -a |grep kcore
0 ./kcore
System is SuSE 11.2 SP1.
The system appears to run correctly, and the output of df -v shows the correct disk... (1 Reply)
Hi Guys
I am trying to move file containing more than two - at the 3rd line of each files to a new directory. The files are something like this :
****** Text ******
/text/
text text
I want to make sure the search effect only take place on the 3rd line one as there might me... (46 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT DEBIAN
ns_execargblk
Ns_Exec(3aolserver) AOLserver Library Procedures Ns_Exec(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
Ns_ExecArgblk, Ns_ExecArgv, Ns_ExecProc, Ns_ExecProcess, Ns_Fork, Ns_GetEnviron, Ns_WaitForProcess, Ns_WaitProcess, ns_fork - External
process execution
SYNOPSIS
#include "ns.h"
int
Ns_ExecArgblk(char *exec, char *dir, int fdin, int fdout,
char *args, Ns_Set *env)
int
Ns_ExecArgv(char *exec, char *dir, int fdin, int fdout,
char **argv, Ns_Set *env)
int
Ns_ExecProc(char *exec, char **argv)
int
Ns_ExecProcess(char *exec, char *dir, int fdin, int fdout,
char *args, Ns_Set *env)
int
Ns_Fork(void)
char
**Ns_GetEnviron(void)
int
Ns_WaitForProcess(int pid, int *statusPtr)
int
Ns_WaitProcess(int pid)
int
ns_fork(void)
_________________________________________________________________DESCRIPTION
These functions handle fork and exec operations. See files: nsd/exec.c, nsd/tclenv.c and nsthread/fork.c.
Ns_ExecArgblk(exec, dir, fdin, fdout, args, env)
Executes a command in a child process. Return process id of child process exec'ing the command or -1 on failure. Provides extended
error checking and error messages.
Ns_ExecArgv(exec, dir, fdin, fdout, argv, env)
Execute a command in a child process using fork(2) and execve(2), returns the process id of child process exec'ing the command or -1
on failure. The child sends an extended error message to the parent.
Ns_ExecProc(exec, argv)
Executes a command in a child process. Returns the process id of the child process exec'ing the command or -1 on failure. Simpli-
fies call to Ns_ExecArgv.
Ns_ExecProcess(exec, dir, fdin, fdout, args, env)
Executes a command in a child process. Returns the process id of the child process exec'ing the command or -1 on failure. Calls
Ns_ExecArgblk with same arguments.
Ns_Fork()
Posix style fork(), using fork1() on Solaris if needed. See fork(2) man page. Calls ns_fork.
Ns_GetEnviron()
Returns pointer to the environment vector.
Ns_WaitForProcess(pid, statusPtr)
Wait for child process. Returns NS_OK on success, or NS_ERROR on failure. *statusPtr is set to the exit code of the child process.
Ns_WaitProcess(pid)
Wait for child process. Calls Ns_WaitForProcess with NULL statusPtr. Returns NS_OK on success, or NS_ERROR on failure.
ns_fork()
Posix style fork(), using fork1() on Solaris if needed.
SEE ALSO nsd(1), info(n)
KEYWORDS AOLserver 4.0 Ns_Exec(3aolserver)