Can someone help me to convert the date format after get it from the "LAST REBOOT" command.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Can someone help me to convert the date format after get it from the "LAST REBOOT" command.
Prev   Next
# 2  
Old 08-13-2010
check the faq article: https://www.unix.com/answers-frequent...rithmetic.html

should find what you're after
or use the search functionality...

trying "date conversion" brought up many hits including

https://www.unix.com/unix-dummies-que...onversion.html

Enjoy ;-)
This User Gave Thanks to Tytalus For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question
REBOOT(8)						    BSD System Manager's Manual 						 REBOOT(8)

NAME
reboot, halt, fastboot, fasthalt -- stopping and restarting the system SYNOPSIS
halt [-lnpq] [-k kernel] reboot [-dlnpq] [-k kernel] fasthalt [-lnpq] [-k kernel] fastboot [-dlnpq] [-k kernel] DESCRIPTION
The halt and reboot utilities flush the file system cache to disk, send all running processes a SIGTERM (and subsequently a SIGKILL) and, respectively, halt or restart the system. The action is logged, including entering a shutdown record into the user accounting database. The options are as follows: -d The system is requested to create a crash dump. This option is supported only when rebooting, and it has no effect unless a dump device has previously been specified with dumpon(8). -k kernel Boot the specified kernel on the next system boot. If the kernel boots successfully, the default kernel will be booted on successive boots, this is a one-shot option. If the boot fails, the system will continue attempting to boot kernel until the boot process is interrupted and a valid kernel booted. This may change in the future. -l The halt or reboot is not logged to the system log. This option is intended for applications such as shutdown(8), that call reboot or halt and log this themselves. -n The file system cache is not flushed. This option should probably not be used. -p The system will turn off the power if it can. If the power down action fails, the system will halt or reboot normally, depending on whether halt or reboot was called. -q The system is halted or restarted quickly and ungracefully, and only the flushing of the file system cache is performed (if the -n option is not specified). This option should probably not be used. The fasthalt and fastboot utilities are nothing more than aliases for the halt and reboot utilities. Normally, the shutdown(8) utility is used when the system needs to be halted or restarted, giving users advance warning of their impending doom and cleanly terminating specific programs. SEE ALSO
getutxent(3), boot(8), dumpon(8), nextboot(8), savecore(8), shutdown(8), sync(8) HISTORY
A reboot utility appeared in Version 6 AT&T UNIX. BSD
October 11, 2010 BSD