How to change owner and group of files.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Debian support > Linux Debian support > How to change owner and group of files.




Pages (2): [1] 2 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to change owner and group of files.  
Henk Oegema


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 12:14 PM

I have a directory ~/.kde/share/apps/kmail/mail/cur with hunderds of files
(e-mails) of which I want to switch owner and group from root root to
henkoegema henkoegema

How can I do that in one command ?

Rgds
Henk





[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
Noozer


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 12:14 PM


"Henk Oegema" <henk@oegema.com> wrote in message
news:RPa1j.219260$gM5.12435682@phobos.telenet-ops.be...
>I have a directory ~/.kde/share/apps/kmail/mail/cur with hunderds of files
> (e-mails) of which I want to switch owner and group from root root to
> henkoegema henkoegema
>
> How can I do that in one command ?

chown henkoegema  ~/.kde/share/apps/kmail/mail/cur/* ; chgrp henkoegema
~/.kde/share/apps/kmail/mail/cur/*


Add a -R after the command to recurse into sub directories.







[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
Henk Oegema


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 12:14 PM

Noozer wrote:

>
> "Henk Oegema" <henk@oegema.com> wrote in message
> news:RPa1j.219260$gM5.12435682@phobos.telenet-ops.be... 
>
> chown henkoegema  ~/.kde/share/apps/kmail/mail/cur/* ; chgrp henkoegema
> ~/.kde/share/apps/kmail/mail/cur/*
>
>
> Add a -R after the command to recurse into sub directories.

Thanks. Specific the -R option was, what I needed.   






[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
Lew Pitcher


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 06:12 PM

On Nov 22, 3:10 am, Henk Oegema <h...@oegema.com> wrote:
> I have a directory ~/.kde/share/apps/kmail/mail/cur with hunderds of files
> (e-mails) of which I want to switch owner and group from root root to
> henkoegema henkoegema
>
> How can I do that in one command ?


chown -R henkoegema:henkoegema ~/.kde/share/apps/kmail/mail/cur/*





[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
Henk Oegema


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 06:12 PM

Lew Pitcher wrote:

> On Nov 22, 3:10 am, Henk Oegema <h...@oegema.com> wrote: 
>
>
> chown -R henkoegema:henkoegema ~/.kde/share/apps/kmail/mail/cur/*

Is the henkoegema:henkoegema for owner and group at the same time?






[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
AHinMaine


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 06:12 PM

>
> chown -R henkoegema:henkoegema ~/.kde/share/apps/kmail/mail/cur/*


Note that this will not work on filenames that begin with a dot.

A better way...

find ~/.kde/share/apps/kmail/mail/cur | xargs chown
henkoegema:henkoegema





[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
Lew Pitcher


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 06:12 PM

On Nov 22, 9:16 am, Henk Oegema <h...@oegema.com> wrote:
> Lew Pitcher wrote: 
> 
> 
>
> Is the henkoegema:henkoegema for owner and group at the same time?

Yes...

CHOWN(1)                         User Commands
CHOWN(1)

NAME
chown - change file owner and group

SYNOPSIS
chown [OPTION]... [OWNER][:[GROUP]] FILE...





[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
Tony van der Hoff


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 06:12 PM

On 22 Nov at 16:01 Lew Pitcher <lpitcher@teksavvy.com> wrote in message
<e825bd41-eb97-428c-9bbd-257ee3fdfd2b@e1g2000hsh.googlegroups.com>

> On Nov 22, 9:16 am, Henk Oegema <h...@oegema.com> wrote: 
>
> Yes...
>
> CHOWN(1)                         User Commands CHOWN(1)
>
> NAME
>        chown - change file owner and group
>
> SYNOPSIS
>        chown [OPTION]... [OWNER][:[GROUP]] FILE...
>

Actually, being really pedantic, you only need
chown -R henkoegema: ~/.kde/share/apps/kmail/mail/cur/*
--
Tony van der Hoff       | mailto:news_0711@vanderhoff.org
Buckinghamshire, England





[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
Dan C


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 06:12 PM

On Thu, 22 Nov 2007 09:20:58 +0000, Henk Oegema wrote:
 
[vbcol=seagreen]
> Thanks. Specific the -R option was, what I needed.   

I guess you've never heard of a "man page", eh?


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".






[ Post a follow-up to this message ]



    Re: How to change owner and group of files.  
Fredderic


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-23-07 06:15 AM

On Thu, 22 Nov 2007 16:43:33 +0000,
Tony van der Hoff <news@nospam.vanderhoff.org> wrote:

> On 22 Nov at 16:01 Lew Pitcher <lpitcher@teksavvy.com> wrote 
> Actually, being really pedantic, you only need
> chown -R henkoegema: ~/.kde/share/apps/kmail/mail/cur/*

You're assuming, of course, that the default group is also
henkoegema...  Here, for example, my default group is "users", but I'm
also in a group with my username.  I changed the default myself because
it's actually useful, as long as you're aware of what groups do.


Also being pedantic.  ;)


Fredderic





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:43 PM.      Post New Thread    Post A Reply      
Pages (2): [1] 2 »   Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register