dpkg -Lを使用してパッケージファイルを一覧表示するときにファイル数を一覧表示する方法はありますか?

dpkg -Lを使用してパッケージファイルを一覧表示するときにファイル数を一覧表示する方法はありますか?

私はそれをcat -nファイルの内容行のリストを取得するために使用しています.txt

[$] cat exam.txt                                                                                                                    
     1  let's see how far does this go, and if it works or not. if not till where it 
     2  goes and what happens after that. In nano, things are much more better than in X 
     3  text editors as there is no set fill therein as there is in nano and hence are 
     4  much worse off. 

dpkgでは行われないようです。それともありますか?私はDebianでdpkg 1.18.18をテストして実行しています。リストをあまり面倒にするためにheadを使用します。

[$] dpkg -L nano | head

/.
/bin
/bin/nano
/etc
/etc/nanorc
/usr
/usr/share
/usr/share/doc
/usr/share/doc/nano
/usr/share/doc/nano/AUTHORS

私はheadを使用しているので。 alsoを1つのファイルと見なすと、10行または10個のファイルであることがわかります。私は次のことを試しました -

$ dpkg -nL nano 

ところで、オプションについて不明なエラーが発生します。

できない場合は、機能要求として提出できるようにお知らせくださいdpkg

ベストアンサー1

dpkg -L nano | cat -n

それはすべてです...(ディレクトリとファイルを計算します。)

ただ合計をしたいなら、

dpkg -L nano | wc -l

おすすめ記事