how to read systems current date and time

Answers were Sorted based on User's Feedback



how to read systems current date and time..

Answer / siba sankar nayak

In Unix, to know the current date and time, the command is
date.

Is This Answer Correct ?    2 Yes 1 No

how to read systems current date and time..

Answer / santana20142003

$date -u +%r -->02:26:38 PM
$ date -u +%T -->14:26:48

Is This Answer Correct ?    1 Yes 0 No

how to read systems current date and time..

Answer / m.venkata ramana

read `date '+%m-%d-%y %H-%M-S%'`

Is This Answer Correct ?    1 Yes 0 No

how to read systems current date and time..

Answer / kirtiranjan sahoo

we can use DATE command to know the system date and time.
and want to any modify, then
date +%Y-%m-%d
Y: Year
m: No of month
d: date number
If you want to know the yesterday date, simply you can write the below command
date -d "yesterday"
or
date -d "-1day"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

What is the difference between a shell variable that is exported and the one that is not exported?

6 Answers  


What is the best scripting language?

0 Answers  


I want to upload a file to remote server through ftp daily.Can anyone suggest how to make a shell script for that.I hv credentials for that ftp

1 Answers  


What are the Different types of shells?

5 Answers  


How to create environment variables?What are the conditions for creating variables?

1 Answers   Infosys, Wipro,






What is the significance of $#?

0 Answers  


In a single command how do you run the previous command in the command prompt.

5 Answers  


What is the crontab?

0 Answers  


How to print the first array element?

0 Answers  


What is a beat in a script?

0 Answers  


Which scripting language is best for automation?

0 Answers  


what is the meaning of First line of shell script ,what is meaning of #! pleas explain brifly

4 Answers  


Categories