Answer the question
In order to leave comments, you need to log in
How to display information about a file?
Good afternoon
How to correctly display information about the file?
Looking for files created in the last 7 days
echo $( find /etc -type f -mtime -7) + $(stat -c '%y' $(find /etc -type f -mtime -7) | awk '{ print $1}')
actually want to print
Имя файла Дата создания Дата изменения
/etc/resolv.conf. (1.04.2021) (15.01.2022)
Answer the question
In order to leave comments, you need to log in
find -maxdepth 1 -type f -printf "%CD %CT \t%AD %AT\t%TD %TT\t%p\n"
02/11/22 06:12:13.2894161360 02/11/22 06:12:13.2894161360 02/09/22 15:39:58.0406894530 ./.bash_history
12/23/21 06:47:45.6371287180 02/10/22 08:38:18.3691395020 10/11/21 08:53:17.7579489750 ./.bash_aliases
...
man find
find the description -ptinf there and select the date and time format you need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question