i need to write a consol script that recieves two parametrs - a location and a string prefix, and outputs the modified time and size of every file in the location that starts with the given prefix.
for example
myscript.sh /localdisk st
will out put something like
start.txt 11111 Dec 2 14:41
stop.jar 1432 Dec 1 11:21
stud.gz 1122 Nov 2 10:12
any ideas? Thanks!
像这样的东西:
find $1/$2* -printf "%f %s %TY-%Tm-%Td %TH:%TM\n"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.