find

Linux中find常見用法示例

·find?? path?? -option?? [?? -print ]?? [ -exec?? -ok?? command ]?? {} \;

find命令的參數;

pathname: find命令所查找的目錄路徑。例如用.來表示當前目錄,用/來表示系統根目錄。
-print: find命令將匹配的文件輸出到標準輸出。
-exec: find命令對匹配的文件執行該參數所給出的shell命令。相應命令的形式為'command' { } \;,注意{ }和\;之間的空格。
-ok: 和-exec的作用相同,只不過以一種更為安全的模式來執行該參數所給出的shell命令,在執行每一個命令之前,都會給出提示,讓用戶來確定是否執行。

#-print 將查找到的文件輸出到標準輸出
#-exec?? command?? {} \;????? —–將查到的文件執行command操作,{} 和 \;之間有空格
#-ok 和-exec相同,只不過在操作前要詢用戶
例:find . -name .svn | xargs rm -rf

====================================================

-name?? filename???????????? #查找名為filename的文件
-perm??????????????????????? #按執行權限來查找
-user??? username???????????? #按文件屬主來查找
-group groupname??????????? #按組來查找
-mtime?? -n +n??????????????? #按文件更改時間來查找文件,-n指n天以內,+n指n天以前
-atime??? -n +n?????????????? #按文件訪問時間來查GIN: 0px">

-ctime??? -n +n????????????? #按文件創建時間來查找文件,-n指n天以內,+n指n天以前

-nogroup???????????????????? #查無有效屬組的文件,即文件的屬組在/etc/groups中不存在
-nouser???????????????????? #查無有效屬主的文件,即文件的屬主在/etc/passwd中不存
-newer?? f1 !f2????????????? 找文件,-n指n天以內,+n指n天以前?
-ctime??? -n +n?????????????? #按文件創建時間來查找文件,-n指n天以內,+n指n天以前?
-nogroup???????????????????? #查無有效屬組的文件,即文件的屬組在/etc/groups中不存在
-nouser????????????????????? #查無有效屬主的文件,即文件的屬主在/etc/passwd中不存
-newer?? f1 !f2?????????????? #查更改時間比f1新但比f2舊的文件
-type??? b/d/c/p/l/f???????? #查是塊設備、目錄、字符設備、管道、符號鏈接、普通文件
-size????? n[c]?????????????? #查長度為n塊[或n字節]的文件
-depth?????????????????????? #使查找在進入子目錄前先行查找完本目錄
-fstype???????????????????? #查更改時間比f1新但比f2舊的文件
-type??? b/d/c/p/l/f???????? #查是塊設備、目錄、字符設備、管道、符號鏈接、普通文件
-size????? n[c]?????????????? #查長度為n塊[或n字節]的文件
-depth?????????????????????? #使查找在進入子目錄前先行查找完本目錄
-fstype????????????????????? #查位于某一類型文件系統中的文件,這些文件系統類型通常可 在/etc/fstab中找到
-mount?????????????????????? #查文件時不跨越文件系統mount點
-follow????????????????????? #如果遇到符號鏈接文件,就跟蹤鏈接所指的文件
-cpio??????????????? %;????? #查位于某一類型文件系統中的文件,這些文件系統類型通常可 在/etc/fstab中找到
-mount?????????????????????? #查文件時不跨越文件系統mount點
-follow????????????????????? #如果遇到符號鏈接文件,就跟蹤鏈接所指的文件
-cpio??????????????????????? #對匹配的文件使用cpio命令,將他們備份到磁帶設備中
-prune?????????????????????? #忽略某個目錄

=====================================================
$find?? ~?? -name?? "*.txt"?? -print??? #在$HOME中查.txt文件并顯示
$find?? .??? -name?? "*.txt"?? -print
$find?? .??? -name?? "[A-Z]*"?? -print?? #查以大寫字母開頭的文件
$find?? /etc?? -name?? "host*"?? -print #查以host開頭的文件
$find?? .?? -name?? "[a-z][a-z][0–9][0–9].txt"??? -print?? #查以兩個小寫字母和兩個數字開頭的txt文件
$find .?? -perm?? 755?? -print
$find?? .?? -perm -007?? -exec ls -l {} \;?? #查所有用戶都可讀寫執行的文件同-perm 777
$find?? . -type d?? -print
$find?? .?? !?? -type?? d?? -print?
$find?? .?? -type l?? -print

$find?? .?? -size?? +1000000c?? -print??????? #查長度大于1Mb的文件
$find?? .?? -size?? 100c???????? -print?????? # 查長度為100c的文件
$find?? .?? -size?? +10?? -print????????????? #查長度超過期作廢10塊的文件(1塊=512字節)

$cd /
$find?? etc?? home?? apps??? -depth?? -print?? | cpio?? -ivcdC65536?? -o?? /dev/rmt0
$find?? /etc -name "passwd*"?? -exec grep?? "cnscn"?? {}?? \;?? #看是否存在cnscn用戶
$find . -name "yao*"?? | xargs file
$find?? . -name "yao*"?? |?? xargs?? echo??? "" > /tmp/core.log
$find?? . -name "yao*"?? | xargs?? chmod?? o-w

======================================================

find?? -name april*????????? ?????????? 在當前目錄下查找以april開始的文件
find?? -name?? april*?? fprint file??????? 在當前目錄下查找以april開始的文件,并把結果輸出到file中
find?? -name ap* -o -name may*?? 查找以ap或may開頭的文件
find?? /mnt?? -name tom.txt?? -ftype vfat?? 在/mnt下查找名稱為tom.txt且文件系統類型為vfat的文件
find?? /mnt?? -name t.txt ! -ftype vfat?? 在/mnt下查找名稱為tom.txt且文件系統類型不為vfat的文件
find?? /tmp?? -name wa* -type l??????????? 在/tmp下查找名為wa開頭且類型為符號鏈接的文件
find?? /home?? -mtime?? -2???????????????? 在/home下查最近兩天內改動過的文件
find /home??? -atime -1????????????????? 查1天之內被存取過的文件
find /home -mmin??? +60????????????????? 在/home下查60分鐘前改動過的文件
find /home?? -amin?? +30????????????????? 查最近30分鐘前被存取過的文件
find /home?? -newer?? tmp.txt???????????? 在/home下查更新時間比tmp.txt近的文件或目錄
find /home?? -anewer?? tmp.txt??????????? 在/home下查存取時間比tmp.txt近的文件或目錄
find?? /home?? -used?? -2????????????????? 列出文件或目錄被改動過之后,在2日內被存取過的文件或目錄
find?? /home?? -user cnscn??????????????? 列出/home目錄內屬于用戶cnscn的文件或目錄
find?? /home?? -uid?? +501????????????????? 列出/home目錄內用戶的識別碼大于501的文件或目錄
find?? /home?? -group?? cnscn????????????? 列出/home內組為cnscn的文件或目錄
find?? /home?? -gid 501?????????????????? 列出/home內組id為501的文件或目錄
find?? /home?? -nouser??????????????????? 列出/home內不屬于本地用戶的文件或目錄
find?? /home?? -nogroup?????????????????? 列出/home內不屬于本地組的文件或目錄
find?? /home??? -name tmp.txt??? -maxdepth?? 4?? 列出/home內的tmp.txt 查時深度最多為3層
find?? /home?? -name tmp.txt?? -mindepth?? 3?? 從第2層開始查
find?? /home?? -empty???????????????????? 查找大小為0的文件或空目錄
find?? /home?? -size?? +512k???????????? ?? 查大于512k的文件
find?? /home?? -size?? -512k?????????????? 查小于512k的文件
find?? /home?? -links?? +2??????????????? 查硬連接數大于2的文件或目錄
find?? /home?? -perm?? 0700??????????????? 查權限為700的文件或目錄
find?? /tmp?? -name tmp.txt?? -exec cat {} \;
find?? /tmp?? -name?? tmp.txt?? -ok?? rm {} \;

find??? /?? -amin??? -10???? # 查找在系統中最后10分鐘訪問的文件
find??? /?? -atime?? -2??????? # 查找在系統中最后48小時訪問的文件
find??? /?? -empty???????????? # 查找在系統中為空的文件或者文件夾
find??? /?? -group?? cat??????? # 查找在系統中屬于 groupcat的文件
find??? /?? -mmin?? -5???????? # 查找在系統中最后5分鐘里修改過的文件
find??? /?? -mtime?? -1?????? #查找在系統中最后24小時里修改過的文件
find??? /?? -nouser?????????? #查找在系統中屬于作廢用戶的文件
find??? /?? -user??? fred???? #查找在系統中屬于FRED這個用戶的文件

查當前目錄下的所有普通文件
# find . -type f -exec ls -l {} \;?
-rw-r–r–??? 1 root????? root???????? 34928 2003-02-25?? ./conf/httpd.conf?
-rw-r–r–??? 1 root????? root???????? 12959 2003-02-25?? ./conf/magic?
-rw-r–r–??? 1 root????? root????????? 180 2003-02-25?? ./conf.d/README?
查當前目錄下的所有普通文件,并在- e x e c選項中使用ls -l命令將它們列出

=================================================
在/ l o g s目錄中查找更改時間在5日以前的文件并刪除它們:
$ find logs -type f -mtime +5 -exec?? -ok?? rm {} \;

=================================================
查詢當天修改過的文件
[root@book class]# find?? ./?? -mtime?? -1?? -type f?? -exec?? ls -l?? {} \;

=================================================
查詢文件并詢問是否要顯示
[root@book class]# find?? ./?? -mtime?? -1?? -type f?? -ok?? ls -l?? {} \;??
< ls … ./classDB.inc.php > ? y
-rw-r–r–??? 1 cnscn??? cnscn?????? 13709?? 1月 12 12:22 ./classDB.inc.php
[root@book class]# find?? ./?? -mtime?? -1?? -type f?? -ok?? ls -l?? {} \;??
< ls … ./classDB.inc.php > ? n
[root@book class]#

=================================================
查詢并交給awk去處理
[root@book class]# who?? |?? awk?? ’{print $1"\t"$2}’
cnscn??? pts/0

=================================================
awk—grep—sed

[root@book class]# df?? -k |?? awk ‘{print $1}’ |?? grep?? -v?? ’none’ |?? sed?? s"/\/dev\///g"
文件系統
sda2
sda1
[root@book class]# df?? -k |?? awk ‘{print $1}’ |?? grep?? -v?? ’none’
文件系統
/dev/sda2
/dev/sda1

1)在/tmp中查找所有的*.h,并在這些文件中查找“SYSCALL_VECTOR",最后打印出所有包含"SYSCALL_VECTOR"的文件名

A) find?? /tmp?? -name?? "*.h"?? | xargs?? -n50?? grep SYSCALL_VECTOR
B) grep?? SYSCALL_VECTOR?? /tmp/*.h | cut??? -d’:'?? -f1| uniq > filename
C) find?? /tmp?? -name "*.h"?? -exec grep "SYSCALL_VECTOR"?? {}?? \; -print

2)find / -name filename -exec rm -rf {} \;
??? find / -name filename -ok rm -rf {} \;

3)比如要查找磁盤中大于3M的文件:
find . -size +3000k -exec ls -ld {} ;

4)將find出來的東西拷到另一個地方
find *.c -exec cp ‘{}’ /tmp ‘;’

如果有特殊文件,可以用cpio,也可以用這樣的語法:
find dir -name filename -print | cpio -pdv newdir

6)查找2004-11-30 16:36:37時更改過的文件
# A=`find ./ -name "*php"` |?? ls -l –full-time $A 2>/dev/null | grep "2004-11-30 16:36:37"

Linux-all,?Linux?|?No Comments ?

find 實例

四月 18th, 2006

  要在/usr/linux中查找所有的*.h,并在這些文件中查找“SYSCALL_VECTOR",最后打印出所有包含"SYSCALL_VECTOR"的文件名,有以下幾種方法實現
find /usr/linux -name "*.h" | xargs -n50 grep SYSCALL_VECTOR
grep SYSCALL_VECTOR /usr/linux/*.h | cut -d’:’ -f1 | uniq > filename
find /usr/linux -name "*.h" -exec grep "SYSCALL_VECTOR" {} \; -print

  我用find / -name filename| rm -rf,不成功,請問為什么不成功?
find / -name filename -exec rm -rf {} \;
find . -name filename |rm -rf試一下{} 表示你找出來的結果。
\; 則相當于“憲法”,沒什么說頭,就是這么規定的,在 -exec 后面需要一個表示該命令終結的的符號。可以在 man find 中找到答案。
要讓rm識別find的結果,如下:
find / -name filename |xargs rm -rf
之所以find . -name filename |rm -rf不通過,是因為rm命令不接受從標準輸入傳過來的指令
查找含特定字符串的文件
例如查找當前目錄下含有"the string you want find…"字符串的文件:
$find . -type f -exec grep “the string you want find…” {} ; -print

  從根目錄開始查tmpfile,一旦查到馬上刪除
find / -name "tmpfile" -exec rm {} \;

  find 的perm問題
請問一下以下命令什么意思?關鍵是那個數字前的-,其他都還知道
find -name ".*" -perm -007
我知道
find -name ".*" -perm 755
這個是用來查找權限位為755的隱藏文件
噢,對了還有,我上邊的命令都省略了find的pathname參數 find默認是查找當前工作目錄的嗎?
如果我用 -ok 替代 -exec, 那么還需要加上 {} \; 嗎?
這個已經清楚,仍然需要,因為 -ok 只是 -exec 的提示模式,它只是多了一個確認操作的步驟,剛才沒有讀懂那幾句E文的意思 呵呵 不好意思
-007是指查找所有用戶都可讀、寫、執行的文件,要小心呀~~~
解釋解釋?
find -name ".*" -perm -007 和 find -name ".*" -perm 777 有區別嗎?
-007是怎么來得呢?
不過有一個問題
我用 find . -perm -100 會列出當前目錄 . , 這是為什么呢?

下面引用由explover在 2002/10/01 06:15am 發表的內容:
-007是指查找所有用戶都可讀、寫、執行的文件,要小心呀~~~
-007是查找含其它用戶(不同組,非屬主)可讀,寫,執行的文件.并不一定要同組可讀寫,-是指最少權限為007.
下面引用由一顆小白菜在 2002/10/01 10:16am 發表的內容:
OK了, 呵呵
不過有一個問題
我用 find . -perm -100 會列出當前目錄 . , 這是為什么呢?
這種方法不會準確的找出目錄的. -100是指權限至少是屬主可運行.
在unix系統下,你可以擁有對目錄文件的執行權你才可以進入一個目錄.這便是目錄文件被列出的原因.
find . -perm -001 -print找到往往是目錄文件.
我的意思當然不是使用這種方法來找目錄,只不過不明白其中的 -100 意義了
那以此類推,是不是 -010是指權限至少是owner同組可執行的嗎?也就是說其實這里的010和-是分開的,-表示一個至少的意思,而且010才是真正用來描述權限位的?
這樣子就明白了 謝謝你噢

  將find出來的東西拷到另一個地方?
find *.c -exec cp ‘{}’ /tmp ‘;’
如果有特殊文件,可以用cpio,也可以用這樣的語法:
find dir -name filename -print | cpio -pdv newdir

  找出磁盤中某個大小范圍內的文件
比如要查找磁盤中大于3M的文件:
find . -size +3000k -exec ls -ld {} ;

  如何用find查找某一天更改的文件?
可以使用這一行命令來實現:
A=`find ~ -print` | ls -l –full-time $A 2>/dev/null | grep "Jun 27" | grep 1998

  使用find 命令查找某個時間段的shell怎么寫。比如11點到12點的。thanks
創建一個腳本judgetime,內容如下:
ls -l $*|awk ‘{split($8,hour,":");if((hour[1]>23 || hour[1] < 1)&&hour[1]<24)print}’
到要查找的目錄下,運行
find ./ -name "*" -exec judgetime {} \;
注意時間格式為24小時制。
thank you ,如果我要精確到分鐘呢
touch -t 04241112 starttemp #精確到12分鐘
touch -t 04241220 endtemp #截止到12點20
find [dir] -newer starttemp -a ! -newer endtemp -exec ls -l {} \;
newer?
那昨天12:10文件如何呢?
每天執行的時候,用當天的日期和時間戳替換一下不就行了嗎?
我不知道他是不是把所有的11:00~12:00的都找出來,是不是只執行一次還是每天都執行?
這種情況俺猜想是自己的東西放在哪忘了,只記得當時是深夜了。
有道理!
不愧是斑竹!
不光知道怎么解決問題,還知道在什么情況下出現這類問題,佩服佩服!
問題又出現了。創建這個文件的時候。本來應該是時間的一欄現在寫上了2002,而不是12:00.
等到12:00過了吧!

  刪除指定日期的文件
find ./ -name 文件名 -exec rm -f {} \;
例:刪除當前30天內沒用過的文件,用如下命令:
find / -atime +30 -exec rm -f {} \;
我自己試著寫了一小段SHELL,也用ll ,grep, rm 幾個命令,用起來還差強人意。
對過濾出來的文件名列表中用了一個FOR語句,再執行rm 。現在我想把這段SHELL 擴展一下讓它每天定時運行將 n 天前的文件刪掉,有沒有人能給我一些提示,謝謝!
還有個問題,對于前面那位朋友提到的"find / -atime +30 -exec rm -f {} \;
"方法,我很早就試過幾次,不過好像都不太對,參數 -atime n 是查找n天前被訪問過的文件,我不明白的是這里的時間參照點是什么,以及這個n天是怎么計算的。
問 題二、對于"ll |cut -f 1" 這個命令我是不是用錯了,我只想取出 ll 中列出的文件名,但用cut -f 命令做不到 ,我只好換用 ll |cut -c 59- 這種方式得到我要的文件名,but it’s a pool idear !我也試過用awk ,好像也不對,看看大家可不可以給我一些小小的提醒,TKS SO MUCH
問題三、如何改變 I結點 的日期格式 我現在的系統顯示的格式是:
-rw-r—– 1 msahz01 users 2253 2002年2月 2日 poheader.i
我想把這換成
-rw-rw-rw- 1 house users 2193 Apr 19 2001 hkdisp.p
如何才能做到這點?
awk 應該可以
ll | awk ‘{print $9}’
刪除多少天之前的文件
find /yourpath -mtime +31 -exec rm {} \;
find /yourpath -mtime +366 -exec rm {} \;

find中, -ctime, -mtime及其-atime有何區別

請問 -ctime 和 -mtime 有什么關系 ?
如果父目錄的 ctime 改變, 那它下面的文件的 ctime 就會自動都改了嗎 ?
-ctime 和 -mtime ,-atime 這些信息是存在哪兒呢 ?

我用 -mtime -1 找到了新建或改的文件.
但怎樣才能找到一天內 mv 來的文件呢( 它們的時間是原有的時間,早于一天 ) ?

用-newer選項啊。
你可以先touch一個你想要的時間的文件如下:
$ touch -t 08190800 test
$ ls -l test
-rw-r–r– 1 dba other 0 Aug 19 08:00 test
然后
$ find . -newer test -print
.
./.sh_history
$ ls -l .sh_history
-rw——- 1 dba other 154 Aug 20 17:39 .sh_history

用touch可以寫出你想要的任何時間的文件,然后用-newer ,! -newer選項即可成功。

1.ctime含inode信息修改的時間.mtime只指文件內容建立或修改的時間.
2 不會.
3.這些信息應該是存在文件系統的超級塊里.

我查了書 -ctime 是指 inode 的改變(或稱文件的狀態改變).
請問 inode 存了哪些信息 ?
做了些小測試,-mtime 改, -ctime 一定也改.
改文件名, -ctime 也會改.
誰能回答 i-node 存了哪些東西 ?

vi /usr/include/sys/inode.h

班主,我不能 access /usr/include/sys/inode.h .
摘書如下:
Directories contain directory entries. Each entry contains a file or subdirectory name and an index node reference number (i-node number). To increase speed and enhance use of disk space, the data in a file is stored at various locations in the computer’s memory. The i-node contains the addresses used to locate all the scattered blocks of data associated with a file. The i-node also records other information about the file including time of modification and access, access modes, number of links, file owner, and file type.
可我發現 -atime 改了, -ctime 還沒改. why ?
( 我先 cat 一個 ASCII 文件,再用 -atime -1 有它用 -ctime -1 居然沒有它.)
著豈不跟 inode 信息改變, ctime 就改矛盾嗎?

我不同意你貼出來的那段文章,正如我提到的那樣,atime,ctime,mtime是放到超級塊里,在sco unix下是一種叫stat的結構.(stat_32),不同的系統文件系統可能不同.
sco 下inode的結構如下:

typedef struct inode
{
struct inode *i_forw; /* inode hash chain */
struct inode *i_back; /* ‘’ */
struct inode *av_forw; /* freelist chain */
struct inode *av_back; /* ‘’ */
int *i_fsptr; /* "typeless" pointer to fs dependent */
ino32_t i_number; /* i number, 1-to-1 with dev address */
ushort i_ftype; /* file type = IFDIR, IFREG, etc. */
short i_fstyp; /* File system type */
off_t i_size; /* size of file */
ushort i_uid; /* owner */
ushort i_gid; /* group of owner */
ushort i_flag;
ushort i_want; /* i_flag extension to avoid MP races */
ushort i_count; /* reference count */
short i_nlink; /* directory entries */
dev_t i_rdev; /* Raw device number */
#define i_namtype i_rdev /* i_ftype==IFNAM subtype */
dev_t i_dev; /* device where inode resides */
struct mount *i_mton;/* ptr to mount table entry that */
/* this directory is mounted on */
struct region *i_rp; /* ptr to shared region if any */
struct stdata *i_sp; /* ptr to associated stream */
struct iisem *isem; /* ptr to XENIX semaphores */
struct iisd *isd; /* ptr to XENIX shared data */
} i_un;
#define i_mnton i_un.i_mton /* i_ftype==IFDIR IMOUNT */
#define i_rptr i_un.i_rp /* i_ftype==IFREG || i_ftype==IFBLK */
#define i_sptr i_un.i_sp /* i_ftype==IFCHR || i_ftype==IFIFO */
#define i_sem i_un.isem /* i_ftype==IFNAM && i_namtype==IFSEM */
#define i_sd i_un.isd /* i_ftype==IFNAM && i_namtype==IFSHD */

struct fstypsw *i_fstypp; /* ptr to file system switch FSPTR */
long *i_filocks; /* pointer to filock (structure) list */
unsigned long i_mappages; /* number of pages currently cached */
unsigned long i_vcode; /* read-ahead block save (NFS) */
short i_wcnt; /* write open count or ITEXT count */
struct lockb i_cilock; /* tas to synchronize i_flag changes */
ushort i_rdlocks; /* count of non-exclusive lockers */
} inode_t;

所以,訪問一個文件不能改變inode信息.
使用chown, chgrp, chmod命令可以很好的比較mtime和ctime
chown改變一個文件的屬主,用ctime可以找到,用mtime便找不到.
試試看.

多謝斑竹! 我是在 Solaris 上面試的.我是對 -ctime 不明白.
試的結果如下:
修改文件,-mtime 改了, -ctime 也會改.
訪問文件,-atime 改了, -ctime 沒變.
chown, chgrp, chmod,mv, 都會使 -ctime 改變,但不影響 -atime 和 -mtime.
touch 可以改 -mtime and/or -atime,但 touch -a 只改訪問時間時,-ctime也改了.
touch -m 改修改時間時,-ctime當然也改了.
好象還有別的很多東西可以令 -ctime 改變, 搞不清楚.
有什么方法可以顯示 -mtime,atime,ctime 嗎?
可以用 -ctime 來實現對目錄的增量文件進行備份或 transfer 嗎 ?
多謝!

沒有什么工具顯示,(可能是俺不知道)
把下面程序里的st_mtime換成st_ctime,或st_atime便可以得到你要的了.
#include
int
main (int argc, char **argv)
{
struct stat buf;
char date[80];
char fname[80];
printf("Enter filename (with full path) to check mtime : ");
scanf("%s",fname);
stat(fname, &buf);
printf ("mtime (in sec) of %s = %ld\n", fname, buf.st_mtime);
strcpy(date, ctime((time_t *)&(buf.st_mtime)));
printf ("mtime (in date) of %s = %s\n", fname, date);
}

至于文件備份,有什么不可以的么?

mtime ls -l 最近修改文件內容的時間
atime ls -lu 最近訪問文件的時間
ctime ls -li 最近文件有所改變的狀態 ,如文件修改,屬性\屬主 改變 ,節點 ,鏈接變化等 ,應該是不拘泥只是時間前后的改變

俺看了ls的幫助,以為只是按ctime或atime排序,顯示的時間還是mtime.

仔細比較了一下,ayhan說的是對的.謝謝ayhan.

多謝 ahyan 提示 ! 我在 Solaris 上試過如下:
mtime 用 ls -l 看到
atime 用 ls -lu 看到
ctime 用 ls -lc 看到. (ls -li 只有 inode number)
摘書如下:
-c Uses time of last modification of the i-node (file
created, mode changed, and so forth) for sorting (-t)
or printing (-l or -n).
-u Uses time of last access instead of last modification
for sorting (with the -t option) or printing (with the
-l option).
-i For each file, prints the i-node number in the first
column of the report.

轉載于:https://www.cnblogs.com/justart/p/7756482.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/253013.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/253013.shtml
英文地址,請注明出處:http://en.pswp.cn/news/253013.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

PHP將多個文件中的內容合并為新的文件

function test(){$hostdir iconv("utf-8","gbk","C:\Users\原萬里\Desktop\日常筆記") ; //iconv()轉換編碼方式&#xff0c;將UTF-8轉換為gbk&#xff0c;若是報錯在gbk后加//IGNORE$filesnames scandir($hostdir); …

HTTP Live Streaming直播(iOS直播)技術分析與實現

不經意間發現&#xff0c;大半年沒寫博客了&#xff0c;自覺汗顏。實則2012后半年&#xff0c;家中的事一樣接著一樣發生&#xff0c;實在是沒有時間。快過年了&#xff0c;總算忙里偷閑&#xff0c;把最近的一些技術成果&#xff0c;總結成了文章&#xff0c;與大家分享。 前些…

中文論文格式【雜】

轉自知乎&#xff0c;https://www.zhihu.com/question/23791742/answer/344752056 【紙張】畢業論文一律打印&#xff0c;采取A4紙張&#xff0c;頁邊距一律采取&#xff1a;上、下2.5cm&#xff0c;左3cm,右1.5cm&#xff0c;行間距取多倍行距(設置值為1.25);字符間距為默認值…

jmeter 非gui 模式跑jmx

D:\study\apache-jmeter-3.0\bin>jmeter -n -t D:\study\apache-jmeter-3.0\基金排行.jmx -l D:\study\apache-jmeter-3.0\result_log\獲取基金排行.jtl D:\study\apache-jmeter-3.2\bin>jmeter -n -t D:\study\apache-jmeter-3.2\bin\examples\test\百度新聞首頁.jmx -l…

noip模擬賽 遭遇

分析&#xff1a;暴力挺好打的&#xff0c;對于前30%的數據神搜&#xff0c;hi相同的數據將所有的建筑按照c從小到大排序&#xff0c;看最多能跳多少,ci0的數據將所有的建筑按照h從小到大排序&#xff0c;枚舉起點和終點&#xff0c;看能否跳這么多,取個max就可以了.這樣70分就…

揭開全景相機創業真相:國外一開源國內就自主

今年以來全景相機有了一個大爆發&#xff0c;國外Google、三星、諾基亞等大廠都進入了這個領域&#xff0c;國內也有很多廠商推出了全景相機。 Bubl全景相機國外一開源&#xff0c;國內就自主。這在VR&#xff08;虛擬現實&#xff09;領域體現的淋漓盡致——Google的Cardborad…

福大軟工1816 · 團隊現場編程實戰(抽獎系統)

值得一看的補充版本演示視頻 軟工錦鯉在這里程序版本鏈接及說明 按時提交版本 以基礎功能為主github鏈接&#xff1a;first version測試環境說明 本程序在python 3.6以上環境下運行操作說明&#xff1a; 鍵入抽獎關鍵詞&#xff0c;支持&#xff1a;#我要紅包#或“我要換組“或…

LeakCanary——直白的展現Android中的內存泄露

之前碰到的OOM問題&#xff0c;終于很直白的呈現在我的眼前&#xff1a;我嘗試了MAT&#xff0c;但是發現不怎么會用。直到今天終于發現了這個新工具&#xff1a; 當我們的App中存在內存泄露時會在通知欄彈出通知&#xff1a; 當點擊該通知時&#xff0c;會跳轉到具體的頁面&am…

老司機做VR視頻,需要什么樣的全景相機?

做為一個在全景內容領域摸爬滾打一年有余的老司機&#xff0c;經歷了太多的坑。最近有不少朋友轉行進入這個領域&#xff0c;問我買什么樣的相機好。我現在項目太多&#xff0c;根本沒空詳盡解答。所以寫下這篇文章&#xff0c;不懂得自己看吧。 說白了&#xff0c;買什么樣子…

域乎曹勝虎:傳統互聯網“生病”了

11月17日&#xff0c;2018&#xff08;第12屆&#xff09;創業周暨全球創業周中國站在上海盛大召開&#xff0c;由上海域乎信息技術有限公司&#xff08;以下簡稱“域乎”&#xff09;承辦的區塊鏈專場論壇——《區塊鏈產業應用賦能精英論壇》成功舉辦&#xff0c;吸引了眾多業…

xml的方式配置AOP:Aspect Oriented Programming

在某些類中, 什么時機, 做什么事情 切入點(point-cut): 在某些類中(Class<?>[] itfc new Class<?>[] { IStudentService.class }) 通知: 什么時機, 做什么事情(InvocationHandler的invoke方法) 切面: 切入點 通知 織入(weaver): Proxy.newProxyInstance: 把切入…

[No0000112]ComputerInfo,C#獲取計算機信息(cpu使用率,內存占用率,硬盤,網絡信息)...

github地址&#xff1a;https://github.com/charygao/SmsComputerMonitor 軟件用于實時監控當前系統資源等情況&#xff0c;并調用接口&#xff0c;當資源被超額占用時&#xff0c;發送警報到個人手機&#xff1b;界面模擬Console的顯示方式&#xff0c;信息緩沖大小由配置決定…

I2C總線之(一)---概述

概述&#xff1a;IC 是Inter-Integrated Circuit的縮寫&#xff0c;發音為"eye-squared cee" or "eye-two-cee" , 它是一種兩線接口。 IC 只是用兩條雙向的線&#xff0c;一條 Serial Data Line (SDA) &#xff0c;另一條Serial Clock (SCL)。 SCL&#xf…

js中級(1)

動畫(1) Css樣式提供了運動 過渡的屬性transition 從一種情況到另一種情況叫過渡 Transition:attr time linear delay&#xff1b; Attr 是變化的屬性 Time 是花費的時間 Linear 變化的速度 Delay 是延遲 復習background:url() no-repeat 50% 50% red; Background-image Ba…

I2C總線之(二)---時序

一、協議 1.空閑狀態 I2C總線總線的SDA和SCL兩條信號線同時處于高電平時&#xff0c;規定為總線的空閑狀態。此時各個器件的輸出級場效應管均處在截止狀態&#xff0c;即釋放總線&#xff0c;由兩條信號線各自的上拉電阻把電平拉高。 2.起始位與停止位的定義&#xff1a; 起始信…

微信小程序設置底部導航欄目方法

微信小程序底部想要有一個漂亮的導航欄目&#xff0c;不知道怎么制作&#xff0c;于是百度找到了本篇文章&#xff0c;分享給大家。 好了 小程序的頭部標題 設置好了&#xff0c;我們來說說底部導航欄是如何實現的。 我們先來看個效果圖 這里&#xff0c;我們添加了三個導航圖標…

HTTP協議(3)瀏覽器的使用之查看源碼

在做CTF的Web類題目時&#xff0c;推薦使用Firefox瀏覽器。下面介紹一些在解題過程中關于瀏覽器的常用技巧。首先就是查看源碼。在做Web題目時&#xff0c;經常需要查看網站源碼&#xff0c;有的flag直接就藏在源碼中&#xff0c;有些題目則是在源碼中給出提示和線索&#xff0…

Autofac IoC容器基本使用步驟【1】

原文&#xff1a;http://www.bkjia.com/Asp_Netjc/888119.html 【原文中有一個地方報錯&#xff0c;下面已修改】 一.基本步驟: 1.設計適合控制反轉(IoC)的應用程序 2.給應用程序Autofac 引用. 3.注冊組件. 4.創建一個Container以備后用. 5.從Container創建一個 lifetime scop…

I2C總線之(三)---以C語言理解IIC

為了加深對I2C總線的理解&#xff0c;用C語言模擬IIC總線&#xff0c;邊看源代碼邊讀波形&#xff1a; 如下圖所示的寫操作的時序圖&#xff1a; 讀時序的理解同理。對于時序不理解的朋友請參考“I2C總線之(二)---時序” 完整的程序如下&#xff1a; #include<reg51.h>…

結對編程總結

這個項目我和我的結對伙伴共花了兩個月時間&#xff0c;之所以選這個項目&#xff0c;因為我們之前都學習過Python&#xff0c;也做過類似的程序&#xff0c;相比較其他項目而言&#xff0c;這個項目更合適&#xff0c;也讓我們對詞頻統計方面的知識加深了了解。寫這個程序我們…