I writing script to list the following details of all the files inside a folder or directory which the user gives as input
File Name Absolute Path Created Date Modified Date Accessed Date Size Version of the file
From the above details I was able get all except the version details.
So when it comes to version of files or content inside a directory which user gives as input following aspects has to be taken care to my knowledge (let me know if I am missing any points)
- I initailly thought to get the owner name and if it is root then to consider it as an commands but later realized that there may be some normal files with root as owner.
- Need to differentiate between a normal file(.txt,.sh,.conf etc) and a command (ls,grep,echo etc).
- And capture the version details of the command since the version place holders keep changing for different commands
$ vi --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 11:13:18) $ sync --version sync (coreutils) 8.4 $ unlink --version unlink (GNU coreutils) 8.4 $ sleep --version version sleep (AT&T Research) 2009-03-12 $ umount --version umount (util-linux-ng 2.17.2)