What does this du command error do with invalid parameters?

To get a breakdown of disk usage, always use

du -m -h -s * -c | sort -h

      

It returns a list like this:

4.0K    merge.sh
8.0K    mergeforums_01.sh
5.2M    _vt
82M     sbc
166M    ip2location.sql
184M    IP2LOCATION-LITE-DB5.CSV
1.6G    _yo.zip
20G     sle
22G     total

      

But in this one branch of directories, I get this:

du: invalid option -- 'e'
du: invalid option -- 'd'
du: invalid option -- 'i'
du: invalid option -- 't'
du: invalid option -- '4'
du: invalid option -- '.'
du: invalid option -- 'p'
du: invalid option -- 'p'

      

It looks like he's telling me to edit 4.pp

What's happening?

+3


source to share


1 answer


There seems to be a file whose name starts with a dash -

.

Use --

to prevent extended filenames from being interpreted as parameters:



du -m -h -s -c -- * | sort -h

      

+6


source







All Articles