![]() |
|
|
Googleのunix.com
|
|||||||
| シェルプログラミングとスクリプティング KSH 、 CSH 、 shに、 bashの、はPerl 、 PHPは、削除するsed 、 Awkの、他のシェルスクリプトやシェルスクリプト言語についての質問の投稿はこちら。 |
その他のUNIXおよびLinuxフォーラムトピックは参考にすること
|
||||
| スレッド | スレッドスターター | フォーラム | 返信 | 最後の投稿 |
| ネットワークソリューション | disturbe_d | IPネットワーク | 2 | 2008年11月4日 03:42午後 |
| 可解 | sudhamacs | ポストお問い合わせサイト管理者とモデレーターここを | 1 | 2008年8月19日 10:44午前 |
| 解決策が必要 | paniruddha | シェルプログラミングとスクリプティング | 3 | 2008年7月9日 05:39午後 |
| このためのAwkのソリューションですか? | timj123 | シェルプログラミングとスクリプティング | 7 | 2008年3月14日 06:28午前 |
| このためには削除するsedソリューションですか? | racbern | シェルプログラミングとスクリプティング | 1 | 2008年3月13日 11:31午前 |
![]() |
|
|
LinkBack | スレッドツール | このスレッドを検索 | スレッドを評価 | 表示モード |
|
|
|
||||
|
良い解決策が必要
こんにちはすべて 私は、実際には777のディレクトリを検索するとその数を報告する、また、我々の報告システムscript.Butでも問題はありませんし、いくつかの制限は1000ディレクトリdont詳細を報告することができますが、今私はいくつかの方法を求めているのは、スクリプトを実行する罰金があるこれを破ることができるし、レポートシステムへの報告書は、私のコードの下で、 5000 777 directories.Pleaseに役立つようです現時点で私はブランクがある。 コード:
#!/bin/bash
check=/var/www/html
res=$(find $check -type d -perm 777 2>/dev/null )
count=$(find $check -type d -perm 777 | wc -l)
echo $count
#echo $res
Reporting system command.
|
|
||||
|
必要が良いslotuion
コード:
#! /bin/bash
TD=$(mktemp -d /tmp/xxxxxxxxx)
ALL="${TD}/allfiles"
REP=<Reporting system command>
trap "rm -Rf ${TD}" 0 1 2 3 9 13 15
cd ${TD}
find /etc -type f > ${ALL}
split -l 100 ${ALL} "prfx-"
find . -name "prfx-*" -exec ${REP} {} \;
exit 0
|
|
||||
|
いくつかのコメント
コード:
#! /bin/bash
TD=$(mktemp -d /tmp/xxxxxxxxx) # create a temp-directory
ALL="${TD}/allfiles" # a filename for the output of find
REP=<Reporting system command> # your command
trap "rm -Rf ${TD}" 0 1 2 3 9 13 15 # erase the temp directory at signal 0,1 etc.
cd ${TD}
find /etc -type f > ${ALL} # find and put all output in one file
split -l 100 ${ALL} "prfx-" # split this file into smaller files with 100
# lines each (filenames start with "prfx-")
find . -name "prfx-*" -exec ${REP} {} \; # find the "prfx-"-files and call your
# command with them (I don't know
# how your command works)
exit 0
|
![]() |
| ブックマーク |
| スレッドツール | このスレッドを検索 |
| 表示モード | このスレッド |
|
|