[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the files listed with du -a do not match ls -R, possible bug?
From: |
Jim Meyering |
Subject: |
Re: the files listed with du -a do not match ls -R, possible bug? |
Date: |
Sun, 25 Aug 2002 22:21:38 +0200 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
Aaron Wegner <address@hidden> wrote:
> I think I found what may be a bug in the du program. So far I have only been
> able to observe this anomaly in my build directory for glibc. The bug is
> uncovered with the following commands, issued from the base of the build
> directory:
> --------------------------------------
> # ls -lR | grep '\.op$' | awk '{printf("%s\n", $NF)}' | sort > ls_c_files
>
> # du -a . | grep '\.op$' | awk 'BEGIN {FS="[\/]"} {printf("%s\n", $NF)}' |
> sort > du_c_files
>
> # sdiff -s du_c_files ls_c_files
I'm pretty sure that's not caused by a bug in du.
Don't depend on the last `field' of each line of ls -lR output
being the file name. That's not true for symlinks.
If you want to find all files with the .op suffix, just use `find',
e.g., like this:
find . -name '*.op'