[root@testhost tmp]# ls -l *.zip *.gz
-rw-r--r--. 1 root root 21182 11月 9 10:44 20191109_testhost_systemlog.tar.gz
-rw-r--r--. 1 root root 436 11月 17 06:31 20191117_testhost.zip
-rw-r--r--. 1 root root 124 11月 17 06:08 20191117_testhost_systemlog.tar.gz
[root@testhost tmp]# find /tmp \( -name "*.gz" -or -name "*.zip" \) | xargs ls -tr | gawk -F/ '{print $NF}' | tail -1
20191117_testhost.zip
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme