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

How many prompts are available in a UNIX system?

1 Answers  


How to initialize a directory size to a variable??

2 Answers  


Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.

1 Answers  


How to declare functions in unix shell script?

4 Answers  


write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?

1 Answers   Wells Fargo,


What is a scripting language simple definition?

1 Answers  


What is the syntax of "expr" command?

2 Answers  


How do I run a powershell script?

1 Answers  


How will you list only the empty lines in a file (using grep)?

4 Answers   ANZ,


How to get script name inside a script?

1 Answers  


Explain about the slow execution speed of shells?

1 Answers  


what are command line arguments? what is the need of those?

1 Answers   Flipkart,


Categories