Re: how to select files not in a list
From: Charles Demas (demas_at_TheWorld.com)
Date: 04/28/04
- Next message: Kevin Collins: "Re: simple script that kills a process"
- Previous message: -linux_lad: "Re: how to select files not in a list"
- In reply to: Carli Fuchs: "how to select files not in a list"
- Next in thread: Stephane CHAZELAS: "Re: how to select files not in a list"
- Reply: Stephane CHAZELAS: "Re: how to select files not in a list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 28 Apr 2004 16:20:35 +0000 (UTC)
In article <4OKdnXX8J8kCURLdRVn2iA@giganews.com>,
Carli Fuchs <carlif@chepnt.net> wrote:
>I have two lists, one list holds actual users, another holds a listing of
>home directories. I want to remove the directories that are not in the
>actual users list. I have tried diff, comm, and uniq, but I cannot get just
>a list of directories of people who are not on the actual users list. Am I
>approaching this task wrong? My approach is to list all folders (they are
>named the same as the accountholder), and compare the folder names to the
>list of people who are current account holders. I was thinking that would
>give me a list of people who had folders but did not have accounts, and then
>I can delete those folders. Is there another way to do this?
grep -v -f user_file dir_file
Chuck Demas
-- Eat Healthy | _ _ | Nothing would be done at all, Stay Fit | @ @ | If a man waited to do it so well, Die Anyway | v | That no one could find fault with it. demas@theworld.com | \___/ | http://world.std.com/~cpd
- Next message: Kevin Collins: "Re: simple script that kills a process"
- Previous message: -linux_lad: "Re: how to select files not in a list"
- In reply to: Carli Fuchs: "how to select files not in a list"
- Next in thread: Stephane CHAZELAS: "Re: how to select files not in a list"
- Reply: Stephane CHAZELAS: "Re: how to select files not in a list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|