I would like to allow only one instance of a script to run at any moment.
I've tried the following solution to count the instances but the result is always the number of running instances plus one and I can't find the problem
ps -ef | grep $0 | sed '/^$/ d' | sed '/grep/ d' | wc -l
Please... (2 Replies)
Hi
Hi! I'm currently using AIX 5.2 and would like to know where can i find to see that there's a restriction on the number of login times a user can have. Example, I want give a 2 login per user but some one to give 3 login and some one have to give unlit login time (without logging off the... (2 Replies)
Hi,
I'm using the ksh shell.
The scenario:
I have a couple of directories
/home/fd
/home/fd/prsd
home/fd/stg
now i have number of files in each of these directories.
some of the files are zipped using gzip so their extension is .gz
the content of the files is as follows
... (4 Replies)
Is there a way that I can limit number of commands that one user can run during period of time. For example Max 10 commands per senconds.:) (3 Replies)
Hello, I have some 150 Cron Jobs running under my UNIX account. I want to add some more jobs. Is there a limit to the number of cron jobs that can be run on an account?
Thank you.
Pramodini (8 Replies)
Hi frnds
i am newbie in linux and trying to write a simple script for adding users.the problem is i am running a while loop under function and loop is running for 3 time more than limit.Here is my Script and output pls help me out :
# CREATE N NO. OF USERS WITH PASSWORD IN SYSTEM
#... (4 Replies)
hi guys
how can i limit number of files in a disk or partition ?
or how can i make a limit to inode number for a disk or partition ?
ext3 or ext4 file system (1 Reply)
Linux top command prints more than 40 processes.
top -b -n 1 > Top_Output.txt
Is there a straight-forward option/way to limit only till the top 5 processes.
( Instead of using head, tail or other unix commands together) (1 Reply)
I have a topic line in markdown that spans more than 80 characters that i need to add a line break. Markdown is simply treating the line break as a brand new line instead of continuing as a topic line.
Eg:
# This is a very long
line
Markdown interprets it as
This is a very long
line (4 Replies)
cat filename| awk '{ $1=""; print $0}'
in my file there are few lines that has more than 3000 characters per line and as soon as I run the above command it cores, strings core reveals that the awk is failing because input string too long, limit. can i get some help from the experts to find... (8 Replies)
Discussion started by: knijjar
8 Replies
LEARN ABOUT FREEBSD
stdbuf
STDBUF(1) BSD General Commands Manual STDBUF(1)NAME
stdbuf -- change standard streams initial buffering
SYNOPSIS
stdbuf [-e bufdef] [-i bufdef] [-o bufdef] [command [...]]
DESCRIPTION
stdbuf is used to change the initial buffering of standard input, standard output and/or standard error streams for command. It relies on
libstdbuf(3) which is loaded and configured by stdbuf through environment variables.
The options are as follows:
-e bufdef
Set initial buffering of the standard error stream for command as defined by bufdef (see BUFFER DEFINITION).
-i bufdef
Set initial buffering of the standard input stream for command as defined by bufdef (see BUFFER DEFINITION).
-o bufdef
Set initial buffering of the standard output stream for command as defined by bufdef (see BUFFER DEFINITION).
BUFFER DEFINITION
Buffer definition is the same as in libstdbuf(3):
"0" unbuffered
"L" line buffered
"B" fully buffered with the default buffer size
size fully buffered with a buffer of size bytes (suffixes 'k', 'M' and 'G' are accepted)
EXAMPLES
In the following example, the stdout stream of the awk(1) command will be fully buffered by default because it does not refer to a terminal.
stdbuf is used to force it to be line-buffered so vmstat(8)'s output will not stall until the full buffer fills.
# vmstat 1 | stdbuf -o L awk '$2 > 1 || $3 > 1' | cat -n
SEE ALSO libstdbuf(3), setvbuf(3)HISTORY
The stdbuf utility first appeared in FreeBSD 8.4.
AUTHORS
The original idea of the stdbuf command comes from Padraig Brady who implemented it in the GNU coreutils. Jeremie Le Hen implemented it on
FreeBSD.
BSD April 28, 2012 BSD