2009/8/13 William Anderson <[email protected]>:
> John Matthews wrote:
>> Hi, I wonder if somebody can help. I have uploaded a something to my
>> server, I need to change the ownership. I managed to change the folders
>> ownership, but not everything inside.
>>
>> the script I used was
>>
>> sudo chown www-data:www-data and filename
>>
>> I think I need to add the -R some where to make it recursive, but not
>> sure where to add it. Should it be after the filename, or before.
>
> command flags almost always go after the command and before the rest of
> the parameters.  See the appropriate man page for specific usage, as
> there are occasionally exceptions.

Just to confuse John even more :-), most commands (and all the ones
that take 'long options', such as --recursive) can cope with the
options being anywhere on the command line.

E.g.
chown -R www-data: files
chown --recursive www-data: files
chown www-data: files --recursive
chown www-data: files -R

are all equivalent (of course, there are other possibilities too :-)
This can be handy if you forgot an option on the previous command - I
often forget the '-l' to ls, and it's easy to type
'<up><space>-l<enter>' or '!! -l' to get what I wanted!

There are some commands that are fussy, e.g. tar is a bit picky.  But
then again, I've had nearly 20 years (argh!) experience with the shell
and you eventually pick up the fussy ones when they keep complaining!
It always works to put the options straight after the command.

Cofion/Regards,
Neil.

-- 
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/

Reply via email to