トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS

Top / linux / System Command Examples / find examples / find ファイルやディレクトリの容量が0の物を検索

#author("2018-02-23T14:36:54+09:00","default:kow","kow")
*find ファイルやディレクトリの容量が0の物を検索 [#t77794e1]
~
- ''syntax:''
~
&color(red,){'' find 検索Path -empty ''};~
~
&color(red,){'' find ./ -empty ''};~
&color(red,){'' find ./ -empty -exec mv {} ./backup \; ''};~
~
~
- ''comment:''~
検索Path以下の0バイトのFile,ディレクトリにヒットします。~
~
- ''Example:''
~
#highlight(php:nogutter:collapse){{
#
#ls -lR
.:
total 7552
drwx------ 2 root root     512 Feb 23 14:05 backup
-rw------- 1 root root  938584 Feb 19 04:22 secure-20180219
-rw------- 1 root root 2715534 Feb 20 04:32 secure-20180220
-rw------- 1 root root 2924721 Feb 21 04:32 secure-20180221
-rw------- 1 root root  576102 Feb 22 04:22 secure-20180222
-rw------- 1 root root  170236 Feb 23 03:45 secure-20180223
-rw------- 1 root root       0 Feb 23 14:25 secure-0    <---0バイトFile

./backup:    <---空っぽのdirectory
total 0
#
#find ./ -empty 
./backup
./secure-0
#
}}
~
#highlight(end)
~
~
&tag(Linux,find);
~
~
[[Goto Top Page>/]]
~


Top / linux / System Command Examples / find examples / find ファイルやディレクトリの容量が0の物を検索