Perl one-liner to determine number of days since the Unix epoch

perl -e 'printf qq{%d\n}, time/86400;'
There are some environments that use this value for password and account expiration. It's helpful to be able to quickly determine the number of days since the Unix epoch (dse) when working directly with the configuration files as an administrator.
Sample Output
14988

1
By: gwchamb
2011-01-14 21:56:19

What Others Think

This is another way to do it: perl -le 'print int time/(60*60*24)'
seungwon · 618 weeks and 3 days ago
Or in bash: echo $(($(date +%s)/86400))
whiskybar · 617 weeks and 5 days ago
I like the BASH method, but there's no guarantee that the GNU date command will be available on any given system.
gwchamb · 617 weeks and 4 days ago
Your article has piqued a lot of positive interest. I can see why since you have done such a good job of making it interesting. ???????
KayGasaway · 31 weeks ago
Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. locking slam latch
KayGasaway · 30 weeks and 4 days ago
Your blog has piqued a lot of real interest. I can see why since you have done such a good job of making it interesting. I appreciate your efforts very much. ?????
KayGasaway · 29 weeks and 6 days ago
This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great. Nft projects
KayGasaway · 27 weeks ago
I am jovial you take pride in what you write. It makes you stand way out from many other writers that can not push high-quality content like you. ????
KayGasaway · 26 weeks and 1 day ago
Theatmangroup is an online news company focused on covering the most important business and breaking news in US and around the globe. 500 toothed dinosaur
Audrey10 · 25 weeks ago
Theatmangroup is an online news company focused on covering the most important business and breaking news in US and around the globe. 500 toothed dinosaur
Audrey10 · 25 weeks ago
Super-Duper site! I am Loving it!! Will come back again, Im taking your feed also, Thanks. horizontal rolling discharge door
KayGasaway · 24 weeks ago
It is and so wonderful in addition to resourceful. I just now appreciate this colorings in addition to the person who obtains the item from the send will likely be happy. http://mehfeel.net/mehfeel/blogs/post/322579">Sunset dinner cruise san diego
nakav51247 · 23 weeks and 6 days ago
Thanks for sharing this quality information with us. I really enjoyed reading. Will surely going to share this URL with my friends. ?????
KayGasaway · 23 weeks and 1 day ago
5 Star Roof Care have been providing Surrey & London quality and competitively priced roofing services for over 30 years. We offer a range of roofs for installation, from lead roofs to Flat, pitched and GRP roofs. Our roofers are fully qualified and trained to give the best possible customer service. Roofer Surrey
gexeji53 · 22 weeks and 3 days ago
hello!! Very interesting discussion glad that I came across such informative post. Keep up the good work friend. Glad to be part of your net community. Ankauf & Recycling von elektronischer Bauelemente
Audrey10 · 20 weeks and 4 days ago
I really impressed after read this because of some quality work and informative thoughts . I just wanna say thanks for the writer and wish you all the best for coming!. eames lounge chair
KayGasaway · 18 weeks and 6 days ago
thanks this is good blog. stirnband
KayGasaway · 18 weeks and 6 days ago
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. simpelslot
Audrey10 · 16 weeks and 4 days ago
Spot up with this write-up, I seriously think this site requirements additional consideration. I’ll more likely once again to study additional, many thanks for that information. Watch With Solar System
gexeji53 · 15 weeks and 3 days ago
HOSTINGLELO provide excellent features at low prices. If you are keen on using wordpress as your website’s foundation, then Hostinglelo is definitely the place to start from. I am highly impressed with its web hosting India cheapest priced hosting and helpful customer support service. It offers a range of plans with wide features at a reasonable price. I would strongly recommend it as a reliable web host. https://hostinglelo.in/
Benjaminlee · 14 weeks and 4 days ago
Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under $500 Near Me pug puppies for sale in texas pug puppies for sale $200 pugs for sale near me under $500 pugs for sale under $400 near me pugs for sale near me puppies for sale near me under $500 pug puppies for sale under $1,000 near me pug for sale pug puppies for sale under $300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under $500 Near Me Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale $200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale
rahimhh21 · 12 weeks and 6 days ago
Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under $500 Near Me pug puppies for sale in texas pug puppies for sale $200 pugs for sale near me under $500 pugs for sale under $400 near me pugs for sale near me puppies for sale near me under $500 pug puppies for sale under $1,000 near me pug for sale pug puppies for sale under $300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under $500 Near Me USA USA USA USA USA USA Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies baby pug puppies for sale pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale $200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale
Perfecthomepugs · 3 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: