Please explain the usage of ampersand in the following command
What I understand is that ampersand is used to run some process in the background. And, what I am expecting from this command is
"Output of who should be displayed on the screen with value of total number of users who have logged in displayed at the bottom of the list."
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Hi,
I have this line in a script:
if mt -f /dev/nst0 rewind > /tmp/status_nst0.log 2>&1 ; then
What does the 2>&1 mean? I think the line is saying that after rewinding the device if the log file does not exist then execute the code but I do not understand the contribution of the 2>&1.... (2 Replies)
Hi,
By using time command we can determine the execution time of a process or command.
bash-2.04$ time ls -l
total 0
-rw-r--r-- 1 admin tac 0 Oct 6 04:46 file1
-rw-r--r-- 1 admin tac 0 Oct 6 04:46 file2
real 0m0.002s
user 0m0.000s
sys 0m0.001s... (5 Replies)
Hi,
17 11 * * * /xx/yy/name.sh >> /tmp/cron.log 2>&1
The above statement is one of the crontab entries.
The crong log is getting appended everytime. Can anyone tell me the usage of "2>&1"?
Thanks. (2 Replies)
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
In the terminal, using the ampersand allows the process to run in the background--Emacs, for example. But is there a way to automatically open Emacs as a background process so I can still use the command line? Typing the ampersand is just annoying to me, and I keep forgetting; it's just too useful... (0 Replies)
I have the following line of code that works wonders. I just don't completely understand it as I am just starting to learn regex. Can you help me understand exactly what is happening here?
find . -type f | grep -v '^\.$' | sed 's!\.\/!!' (4 Replies)
Hi all,
Been reading a lot of the cpu load and its "analogy of it to car traffic path of expressway"
From wiki
Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux also includes processes in uninterruptible sleep states... (13 Replies)
Hello everybody,
I have a Problem with sed command.
I want to replace a defined string with a string from a database field (dynamic).
e.g.
sed -i -e 's/%NAME%/'"$HNAME"'/g'
The Problem is that the $HNAME variable can contain Special characters like '&'
e.g.
HNAME="AH Kruger & Co. KG"
... (1 Reply)
For years I have spawned shell scripts with nohup and ampersand and they run whether or not I stay logged in. Recently a client told us that we had to set a keep alive timeout on all of our Redhat 7.6 Linux servers. Our sysadmin set the following parameters in the sshd_config file on all of our... (10 Replies)
Discussion started by: gandolf989
10 Replies
LEARN ABOUT LINUX
rusers
rusers(1) User Commands rusers(1)NAME
rusers - who is logged in on remote machines
SYNOPSIS
rusers [-ahilu] host...
DESCRIPTION
The rusers command produces output similar to who(1), but for remote machines. The listing is in the order that responses are received, but
this order can be changed by specifying one of the options listed below.
The default is to print out the names of the users logged in. When the -l flag is given, additional information is printed for each user:
userid hostname:terminal login_date login_time idle_time login_host
If hostname and login host are the same value, the login_host field is not displayed. Likewise, if hostname is not idle, the idle_time is
not displayed.
A remote host will only respond if it is running the rusersd daemon, which may be started up from inetd(1M) or listen(1M).
In the absence of a name service, such as LDAP or NIS, rusers displays host names as numeric IP addresses.
OPTIONS -a Give a report for a machine even if no users are logged on.
-h Sort alphabetically by host name.
-i Sort by idle time.
-l Give a longer listing in the style of who(1).
-u Sort by number of users.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWrcmdc |
+-----------------------------+-----------------------------+
SEE ALSO who(1), inetd(1M), listen(1M), pmadm(1M), sacadm(1M), attributes(5)SunOS 5.10 7 Mar 2003 rusers(1)