I realize this is basic and probably obvious, but I'm pulling my hair out. I'm guessing this is just some flag on the file command or somesuch, but I can't find it. Help me get unstuck please?
EDIT: I guess what I'm asking is once I've got the ls -l output for a file, what command do I use to take a specific part of that output (the modification date, or the group write permissions, for example) and somehow isolate or separate it so it can be compared to some other value?
- The problem statement, all variables and given/known data:
Get the current date from the UNIX system and print a statement as to whether the file was created today or not.
- Relevant commands, code, scripts, algorithms:
Wish I knew. All I really want to know is how to extract the modification date from a file in a form that can be plugged into an if/then statement. I can take it from there. I can pull the information up on screen with ls -l for all the files in a directory, I just can't figure out how to isolate it for one file so I can compare it to something else. The same goes for permissions, too.
- The attempts at a solution (include all code and scripts):
Numerous references to the textbook's index and some use of Google.
- Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
McHenry County College, Crystal Lake, IL, USA, Diaz, CIS 143