Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # See "long" root's sessions
- last root -t $(date -d "-100000 sec" +%Y%m%d%H%M%S)|grep still
- # See timezone offset
- date +%z
- # See future timezone offset
- date -d "+31 day" +%z
- # See time after 31 day
- date -d "+31 day"
- # In UTC
- date -d "+31 day" -u
- # UNIX timestamp (since 1970)
- date +%s
- date +%s.%N # with nanosecs
- # UNIX timestamp to date
- date --date=@1239646412
- # Current month
- mon=$(date +%m)
- # Month begin
- beg=$(date +%s -d "${mon}/1")
- # Current time
- now=$(date +%s)
- # Month end
- end=$(date +%s -d "${mon}/1+ 1 month - 1 sec")
- # Month percent
- echo "(${now}-${beg})/(${end}-${beg})*100"|bc -lq
- # Date of file modification
- date -r file +%s
Advertisement
Add Comment
Please, Sign In to add comment