Sorting of passwd/group files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Tony Schreiner wrote on Fri, 31 Mar 2006 11:39:24 -0500:

> sort -t: +0 /etc/passwd >outfile-byname 
> sort -t: -n +2 /etc/passwd >outfile-byuid 
> ? 

Ah, great, thanks, Tony! I know some of the old Unix shell commands can do 
really neat things, but i tend to forget about them, I didn't "grow up" 
with them. If there hadn't been any feedback I would have resorted to 
coding this in Perl, much of a waste of time.

>  
> for what purpose do you need this?

It helps in comparing between machines. And it helps much when you 
transfer users from one machine to another. I just snip them out in the 
relevant files and add them on the other machine. Usually something like 
all users above uid 10000 or so. If the list isn't sorted it's a bit 
harder to do that.

Kai

-- 
Kai Sch?tzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux