I was wondering if anyone had a script that would display the last time a user logged into a particular machine. I know about the "last" command, but it gives too much info.... I just wanted to know the last time a user used his/her id. ANy help would be greatly appreciated.
Ryan (3 Replies)
I have a number of files of the format filename.xfr_mmddyy_%H%M%S which i get in a specified directory daily. Now i want to search in the specified directory & delete the files which are more than 2 days old .So I use a command
find $DIR/backup/* -ctime +2 -exec rm -f {} \;
But after executing... (1 Reply)
Hi,
In unix the command "date +%s" displays the date-time in seconds since â00:00:00 1970-01-01 UTCâ (a GNU extension)
when executed on unix:
-sh-2.05b$ date +%s
1152092690
I tried with all the format control output but unable to display the date-time in seconds i,e as in unix format. Can... (6 Replies)
hi all,
am trying to 'grep' some text from a log file and use the 'cut' command to read from that line i just grep'ed to extract date/time and response times.
code sniplet i am using is :
grep -i 'text to grep' Out.log |
while read LINE;
do
... (11 Replies)
hai,
I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc".
(here "oasitqtc" is the owner of the directory or sub directory.)
i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Hi , I have BASH system & i am trying to display the files created on a particular date and time, and after displaying those files I also want to delete all those files.Can anyone of you help me out for this.............
Thanx
Original post contents restored...
Please do not erase the question... (3 Replies)
hi,
i have a Archive directory in which files are archived or stored with date and time stamp to prevent over writing.
example:
there are 5 files
s1.txt
s2.txt
s3.txt
s4.txt
s5.txt
while moving these files to archive directory, date and time stamp is added.
of format `date... (9 Replies)
In gdb is there any way we can display date/time in first column while debugging or is there any command which will print date/time?
I am asking this just to know when exactly a breakpoint got hit. (6 Replies)
Discussion started by: rupeshkp728
6 Replies
LEARN ABOUT OPENSOLARIS
uname
uname(2) System Calls uname(2)NAME
uname - get name of current operating system
SYNOPSIS
#include <sys/utsname.h>
int uname(struct utsname *name);
DESCRIPTION
The uname() function stores information identifying the current operating system in the structure pointed to by name.
The uname() function uses the utsname structure, defined in <sys/utsname.h>, whose members include:
char sysname[SYS_NMLN];
char nodename[SYS_NMLN];
char release[SYS_NMLN];
char version[SYS_NMLN];
char machine[SYS_NMLN];
The uname() function returns a null-terminated character string naming the current operating system in the character array sysname. Simi-
larly, the nodename member contains the name by which the system is known on a communications network. The release and version members fur-
ther identify the operating system. The machine member contains a standard name that identifies the hardware on which the operating system
is running.
RETURN VALUES
Upon successful completion, a non-negative value is returned. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
The uname() function will fail if:
EFAULT The name argument points to an illegal address.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO uname(1), sysinfo(2), sysconf(3C), attributes(5), standards(5)SunOS 5.11 21 Jul 1999 uname(2)