Find Files that are Modified Today (or Since Certain Time Ago) in Unix查找檔案,修飾今日(或自某一時間前)在Unix
To find all files that was modified since a specific time ago (ie an hour ago, a day ago, 24 hours ago, a weeks ago and so on) in Unix environment, the find command will come in handy.要查找所有文件的修改,因為一個具體的時間前(即一個小時前,一天前, 24小時前,一個星期前等等)在Unix環境中,找到命令能派上用場。 The command syntax is:命令語法是:
To find all files modified in the last 24 hours (last full day) in current directory and its sub-directories: 要查找所有文件修改,過去24小時內(最後一天)在當前目錄及其分目錄:
find . 查找。 -mtime -1 -print ,修改時間-1打印
Flag -mtime -1 option tells find command to look for files modified in the last day (24 hours).國旗修改時間-1找到選項告訴命令尋找修改的文件中的最後一天( 24小時) 。 Flag -print option will cause find command to print the files’ location.國旗打印選項將導致找到命令來打印文件的位置。 -print can be replaced with -ls if you want a directory-listing-type response.印刷可以改為-最小二乘如果您想要的目錄清單式的反應。
To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories: 要查找所有文件修改,過去24小時內(最後一天)在某一特定目錄及其分目錄:
find /directory_path -mtime -1 -print 找到/ directory_path ,修改時間-1打印
The command is basically the same with the earlier command, just that now you no need to cd (change directory) to the directory you want to search.該命令是基本相同的前指揮,只是現在你沒有必要到CD (改變目錄)的目錄您想要搜尋。
To find all files with regular file types only, and modified in the last 24 hours (last full day) in current directory and its sub-directories: 若要尋找所有檔案與定期檔案類型只,改良在過去24小時內(最後一天)在當前目錄及其分目錄:
find /directory_path -type f -mtime -1 -print 找到/ directory_path型的F -修改時間-1打印
To find all files that are modified today only (since start of day only, ie 12 am), in current directory and its sub-directories: 為了找到所有文件,修改今天,只有(自開始僅一天,即12時) ,在當前目錄及其分目錄:
touch -t `date +%m%d0000` /tmp/$$ 觸摸噸`日期+ % % d0000米` / tmp的/ $ $
find /tmefndr/oravl01 -type f -newer /tmp/$$ 找到/ tmefndr/oravl01型的F -新/ tmp的/ $ $
rm /tmp/$$ 刪除/ tmp的/ $ $
The first command can be modified to specify other date and time, so that the commands will return all files that have changed since that particular date and time.第一個命令可以進行修改,以指定其他日期及時間,因此,命令將返回所有文件已經改變,因為這一特定的日期和時間。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明:這是一台機器翻譯網頁這是“原樣”提供,無保修。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article英文原文的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at共享和貢獻或獲得技術支持和幫助 My Digital Life Forums 我的數字生活論壇 . 。
Related Articles相關文章
- How to Turn Off and Skip MSN/Windows Live Hotmail Today News Direct to Inbox如何關閉和跳躍的MSN / Windows Live Hotmail服務今日新聞直接向收件箱
- Shadow Copy and Salvage Previous Versions of Files in Windows 2000/XP/Vista with FileHamster陰影複製及救助先前版本的文件在Windows 2000/XP/Vista與FileHamster
- Change Group Ownership of Symbolic Links in Unix or Linux漲跌集團擁有象徵性的聯繫在Unix或Linux
- Configure, Change or Set OpenOffice.org to Default Save Files in Microsoft Office Formats配置,改變或設置OpenOffice.org默認文件保存在Microsoft Office格式
- Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time自動關機和重新啟動了Apache的httpd服務守護進程在預設時間
- Battery Pack Pro Reviews電池匣親評語
- Refresh Linux or Unix Path Environmental Variables with rehash刷新Linux或Unix路徑環境變量與翻版
- Upload (mput) and Download (mget) Multiple Files Automatically in FTP Transfer上傳( mput )和下載( mget )多個文件自動在FTP傳輸
- Vista Previous Versions (Shadow Copy) vs Recycle Bin Vista的舊版本(卷影副本)比回收站
- Display and View FireFox Cache Files Without Browser Cache Viewer顯示和查看瀏覽器緩存文件沒有瀏覽器的緩存瀏覽器

































August 4th, 2007 08:59 2007年8月4日8時59分
Great Thnks!大Thnks !
May 7th, 2008 15:35 2008年五月七日15:35
Very good article, thanx!非常好的文章, thanx !
June 30th, 2008 11:46 2008年6月30日11:46
[...] References: [...]參考文獻: http://www.mydigitallife.info/2006/01/19/find-files-that-are-modified-today-or-since-certain-time-ag.. http://www.mydigitallife.info/2006/01/19/find-files-that-are-modified-today-or-since-certain-time-ag .. . 。 [...]