Kero4 Wiki
開始行:
#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 <...
./backup: <---空っぽのdirectory
total 0
#
#find ./ -empty
./backup
./secure-0
#
}}
~
#highlight(end)
~
~
&tag(Linux,find);
~
~
[[Goto Top Page>/]]
~
終了行:
#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 <...
./backup: <---空っぽのdirectory
total 0
#
#find ./ -empty
./backup
./secure-0
#
}}
~
#highlight(end)
~
~
&tag(Linux,find);
~
~
[[Goto Top Page>/]]
~
ページ名: