In Linux how to make a file with a name that is current date and time
Fresh3 days ago
Mar 15, 202631403 viewsConfidence Score0%
0%
Problem
I want to make a file which name will be a current date and time. I can create a file with the command. Also I can get current time with the command. So, I think, I need to somehow pipe the second command to the first one. How can I do that?
Error Output
touch
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: In Linux how to make a file with a name that is current date and time
Low Risk
Use the return value from a shell expression as the argument to : Result: A file named e.g. . This answer assumes you're using (it's described in the page section Command Substitution), but other shells will work the same or only slightly different.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix