Sponsored Content
Top Forums Shell Programming and Scripting Can someone help me to convert the date format after get it from the "LAST REBOOT" command. Post 302446296 by pichitw on Wednesday 18th of August 2010 08:14:33 AM
Old 08-18-2010
My question have resolved. my partner sent this URL to me. It can help someone who needs the output like me. Smilie

General Solaris 10 Discussion - Unix last command does not dispay year
 

10 More Discussions You Might Find Interesting

1. AIX

Issues with "SU - userid -c command" on system reboot

Hi All! My db2 is started in the AIX /etc/inittab on systemreboot as follows db3:2:once:su - db2inst3 -c db2start >/dev/console 2>1 I changed the .profile of db2inst3 to put an alias to the db2start command as follows alias db2start="/usr/bin/ksh /home/db2inst3/sample/db2start.ksh" When... (1 Reply)
Discussion started by: voorkey
1 Replies

2. Shell Programming and Scripting

Date increment in the format "YYYYMMDD"

Hi all, I want to increment the date which is in the format "YYYYMMDD". ex: If the date is 20010601 Increment should be: 20010602, 20010603 etc., Any help will be much appreciated. Many Thanks and Regards, Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies

3. UNIX for Dummies Questions & Answers

converting date format: "May 31 2008" to "2008-05-31"

I have the following script to find out the last day of the last month .... and the output of this script is in the following format ... Script goes like this .... #!/bin/ksh cur_month=`date +%m` cur_year=`date +%Y` prev_month=$(($cur_month-1)) # Check to see if this is January if ... (8 Replies)
Discussion started by: santosham
8 Replies

4. Shell Programming and Scripting

Format output from the file to extract "date" section

Hello Team , I have to extract date section from the below file output. The output of the file is as shown below. I have to extract the "" this section from the above output of the file. can anyone please let me know how can we acheive this? (4 Replies)
Discussion started by: coolguyamy
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

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)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

How to increment date using "for loop" in format MMDDYY inside the shell script?

Need to increment the date from "currentdate + 90days" inside the for loop (i=1 to i=50) (5 Replies)
Discussion started by: aroragaurav.84
5 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

awk "date" and "system" command

Hello experts! I need your help please I have a file.txt of which I want to extract 3rd and 4th columns with date with the form e.g.: 2016-11-25 03:14:50and pass them to "date" command, but also append the 9th column in a file as well. So I want to execute date -d '2016-11-25 03:14:50' ... (2 Replies)
Discussion started by: phaethon
2 Replies

9. Solaris

Changing "rx_queue_number" in "ixgbe.conf". Reboot or Network Restart?

Hi all, First post here. Working on Solaris 10, on a Sun t4-4, need to change RX queue depth(ethernet, not HBA) and was wondering if i could get by with just restarting the network or if i should just bounce the whole shebang. Apologies if i missed a similar thread. if there is one, please... (2 Replies)
Discussion started by: caspnx
2 Replies

10. Windows & DOS: Issues & Discussions

Convert "hex" foldername to "ascii"

So, I have a folder, containing subdirs like this: 52334d50 52365245 524b4450 524f3350 52533950 52535050 52555550 now I want to go ahead and rename all those folder: hex -> ascii (8 Replies)
Discussion started by: pasc
8 Replies
REBOOT(8)						    BSD System Manager's Manual 						 REBOOT(8)

NAME
reboot, poweroff, halt -- restarting, powering down and stopping the system SYNOPSIS
halt [-dlnpqvxz] poweroff [-dlnqvxz] reboot [-dlnqvxz] [arg ...] DESCRIPTION
The poweroff, halt and reboot utilities flush the file system cache to disk, send all running processes a SIGTERM, wait for up to 30 seconds for them to die, send a SIGKILL to the survivors and, respectively, power down, halt or restart the system. The action is logged, including entering a shutdown record into the login accounting file and sending a message via syslog(3). The options are as follows: -d Create a dump before halting or restarting. This option is useful for debugging system dump procedures or capturing the state of a corrupted or misbehaving system. -l Suppress sending a message via syslog(3) before halting or restarting. -n Do not flush the file system cache. This option should be used with extreme caution. It can be used if a disk or a processor is on fire. -p Attempt to powerdown the system. If the powerdown fails, or the system does not support software powerdown, the system will halt. This option is only valid for halt. -v To enable verbose messages on the console, pass the boothowto(9) flag AB_VERBOSE to reboot(2). -x To enable debugging messages on the console, pass the boothowto(9) flag AB_DEBUG to reboot(2). -z To silence some shutdown messages on the console, pass the boothowto(9) flag AB_SILENT to reboot(2). -q Do not give processes a chance to shut down before halting or restarting. This option should not normally be used. If there are any arguments passed to reboot they are concatenated with spaces and passed as bootstr to the reboot(2) system call. The string is passed to the firmware on platforms that support it. Normally, the shutdown(8) utility is used when the system needs to be halted or restarted, giving users advance warning of their impending doom. SEE ALSO
reboot(2), syslog(3), utmp(5), boot(8), init(8), rescue(8), shutdown(8), sync(8) HISTORY
A reboot command appeared in Version 6 AT&T UNIX. The poweroff command first appeared in NetBSD 1.5. CAVEATS
Once the command has begun its work, stopping it before it completes will probably result in a system so crippled it must be physically reset. To prevent premature termination, the command blocks many signals early in its execution. However, nothing can defend against delib- erate attempts to evade this. This command will stop the system without running any shutdown(8) scripts. Amongst other things, this means that swapping will not be dis- abled so that raid(4) can shutdown cleanly. You should normally use shutdown(8) unless you are running in single user mode. BUGS
The single user shell will ignore the SIGTERM signal. To avoid waiting for the timeout when rebooting or halting from the single user shell, you have to exec reboot or exec halt. BSD
February 16, 2011 BSD
All times are GMT -4. The time now is 02:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy