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 |
How do I run a shell script on a mac?
How to group the commands in shell scripting?
What lives in a shell?
How do you know which shell I am using?
How would you compare the strings in a shell script?
1.Write a script, which converts a number from binary to hexadecimal format or vice versa.
Why is a script important?
How do you rename the files(*.sh) with file names containing space in it?for example "interview question.sh" needs to rename to "interview-question.sh". Appreciate your inputs.Thanks.
shell script for reverse the string
What is the equivalent of a file shortcut that we have a window on a linux system?
Write down the syntax for all the loops in shell scripting.
What does $0 mean in shell script?