how to read systems current date and time

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What does echo mean in scripting?

594


How will you print the login names of all users on a system?

579


What is the first line in a shell script?

562


What is the syntax of "nested if statement" in shell scripting?

639


shell script for reverse the string

925






What is a beat in a script?

550


Is scripting and coding the same thing?

571


what is info area how many types?

2297


I want to connect to a remote server and execute some commands, how can I achieve this?

580


What can scripts do?

670


What is the best shell scripting language?

545


How do I run a .sh file?

621


Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.

1859


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

3608


Is shell a part of kernel?

568