[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
du and exclution of directories.
From: |
Robert Lindgren |
Subject: |
du and exclution of directories. |
Date: |
Tue, 04 Jan 2005 22:08:47 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041218) |
From what I understand it's not possible to exclude a directory path
with the du command, this would be very nice to have.
mkdir -p 1/1 2/2 3/3
echo "count me" > 1/1/file1
echo "count me" > 2/2/file2
echo "exclude me" > 3/3/file3
du
4 ./1/1
4 ./1
4 ./2/2
4 ./2
4 ./3/3
4 ./3
12 .
Excludes everything names 3.
du --exclude="3"
4 ./1/1
4 ./1
4 ./2/2
4 ./2
8 .
This is what I want to do, just exclude the path 3/3
du --exclude="3/3"
4 ./1/1
4 ./1
4 ./2/2
4 ./2
4 ./3/3
4 ./3
12 .
But it doesn't work with du version 5.2.1. I understand that it's
probably a correct behavior and not a bug, but in tar it's possible to
exclude a path and it would be nice if one could du that in du also.
Best regards
Robert Lindgren
- du and exclution of directories.,
Robert Lindgren <=