一部のオプションが利用できない理由

一部のオプションが利用できない理由

私はSynology NAS(BusyBox実行)でbashを使用しています。最近、オペレーティングシステムを再インストールする必要がありました。これでduを使用してフォルダサイズを含むファイルを生成するスクリプトは失敗します。 duには、オプションが少ないからです。つまり

du -hc --max-depth=1 --exclude=deleted --exclude=README.txt --exclude=#recycle /path/to/event_media/* >> /path/to/media_files_list.txt

私にしてください:

du: unrecognized option '--max-depth=1'

だから私はいつ...

du --help

わかりました..

BusyBox v1.16.1 (2014-05-29 11:29:56 CST) multi-call binary.

Usage: du [-aHLdclsxhmk] [FILE]...

Summarize disk space used for each FILE and/or directory.
Disk space is printed in units of 1024 bytes.


Options:

    -a      Show file sizes too
    -L      Follow all symlinks
    -H      Follow symlinks on command line
    -d N    Limit output to directories (and files with -a) of depth < N
    -c      Show grand total
    -l      Count sizes many times if hard linked
    -s      Display only a total for each argument
    -x      Skip directories on different filesystems
    -h      Sizes in human readable format (e.g., 1K 243M 2G )
    -m      Sizes in megabytes
    -k      Sizes in kilobytes (default)

オプションセットが縮小されました。

変更された内容と最大深度と除外など、完全なオプションセットに再アクセスするように設定する方法を理解するのに役立つ人はいますか?

ベストアンサー1

使用したいオプションがあります。牛に似た一種の栄養バージョンdu(以降コアツールパッケージ)、これは組み込みLinuxシステムではなくシステムで見つけることができます。あなたのNASは以下を提供します。忙しい箱バージョンは通常、組み込みシステムで見られるバージョンです。 BusyBoxユーティリティは小さいですが(ディスク容量、RAMが少ない)機能は少なくなります。

GNU coreutilsをインストールするか、システムで使用できるスクリプトを調整する必要があります。 Google 検索では、GNU coreutils をインストールできることを提案しました。ipkg経由

おすすめ記事