![](/img/trans.png)
[英]Linux - is there a way to get the file size of a directory BUT only including the files that have a last modified / creation date of x?
[英]Linux console script to get file size and modified date based on prefix?
我需要編寫一個接受兩個參數的consol腳本-一個位置和一個字符串前綴,並輸出以給定前綴開頭的位置中每個文件的修改時間和大小。
例如
myscript.sh /localdisk st
會把像
start.txt 11111 Dec 2 14:41
stop.jar 1432 Dec 1 11:21
stud.gz 1122 Nov 2 10:12
有任何想法嗎? 謝謝!
像這樣的東西:
find $1/$2* -printf "%f %s %TY-%Tm-%Td %TH:%TM\n"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.