Linux Command Cari File Update Terakhir

Berikut ini adalah script shell untuk mencari file yang telah diupdate terakhir kali

#!/bin/bash
find $1 -type f | xargs stat --format '%Y :%y %n' | sort -nr | cut -d: -f2- | head -14

head -14 artinya menampilkan file yang diupdate sejak 14 hari lalu, anda bisa ubah head -1 untuk melihat file yang dirubah 1 hari lalu dan seterusnya.

Selamat mencoba

Leave a Reply

Your email address will not be published. Required fields are marked *

What is 7 + 12 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

 

Wordpress SEO Plugin by SEOPressor