how to read systems current date and time
Answers were Sorted based on User's Feedback
In Unix, to know the current date and time, the command is
date.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / santana20142003
$date -u +%r -->02:26:38 PM
$ date -u +%T -->14:26:48
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
What language is bash?
What is difference between bash and shell?
What are the Different types of shells?
What will happen to my current process when I execute a command using exec?
Write a shell script to get current date, time, user name and current working directory.
What is the significance of the shebang line in shell scripting?
Create a bash shell script that reads a line from the user consisting of 5 words and then prints them out in reverse order. Name this script "reverse.sh"
What language is bash written in?
What are the advantages of shell script?
Why is used in shell scripting?
What is the default shell of solaris?
How will you find the 99th line of a file using only tail and head command?