cmds

1
1. date command 1. $ date Wed Mar 18 10:27:15 IST 2015 [[displays the current date and time in the timezone of machine is. ]] 2. Displaying Julian Date means total no. Of days from start of year. $ date +%j 077 or date -d “2011/07/13” +%j 3. displaying in particular format (%Y displays in 4 digit & %y displays in two digit) use combination of Upper case & lower case. date +%d\/%m\/%Y 4. find date after and before date. date -d "-7 days" date -d "+7 days" 5. format of changing date time in linux date mmddhhmi [[Not year as current year by default ]]. 6. Displaying day name date +%a or date +%A

Upload: kuku288

Post on 11-Dec-2015

222 views

Category:

Documents


3 download

DESCRIPTION

commands

TRANSCRIPT

Page 1: cmds

1. date command

1. $ date Wed Mar 18 10:27:15 IST 2015

[[displays the current date and time in the timezone of machine is.]]

2. Displaying Julian Date means total no. Of days from start of year.

$ date +%j077

or date -d “2011/07/13” +%j

3. displaying in particular format (%Y displays in 4 digit & %y displays in two digit) use combination of Upper case & lower case. date +%d\/%m\/%Y

4. find date after and before date. date -d "-7 days" date -d "+7 days"5. format of changing date time in linux date mmddhhmi [[Not year as current year by default ]].

6. Displaying day name

date +%a or date +%A