- Forums
- Tutorial and Guides
- How To Make A File Name From Output Date
want to know how to make a file name from output? if so , lets show you how ok, lets say you want to create a file using the the date format for the filename [758], Last Updated: Mon Jun 24, 2024
Webune Support
Tue Mar 09, 2010
1 Comments
472 Visits
ok, lets say you want to create a file using the the date format for the filename
for example a file that looks like this:
12345678.txt
well, if this is what you want to do, follow the steps provided here by Webune Support Team.
Webune Offers Linux Dedicated Server!!!!
you use this command to create a file from the date:
echo "Webune Web Hosting" > `date +%m%d%Y`.txt
done
hope that works
if you wanted to display the date into one whole string you can use this command
if you wanted to display the date into one whole string you can use this command:
date +%m%d%Y
it will display this:
01072008
in my case right now its Jan 07 2008 so it displays 01072008 this is how i break it down:
01 = (month)
07 = (day)
2008 =(year)
i think this is similar to php time() function
https://www.webune.com/forums/20100309cbcf.html