LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   commands with -cR (https://www.linuxquestions.org/questions/linux-newbie-8/commands-with-cr-303397/)

zeshan_b 03-18-2005 10:13 PM

commands with -cR
 
I was changing user groups on linux and looking at the man page there was a way to automaticly change the usergroups for files and folders in a directory. I ran the following command:

chgrp -cR groupname /

WARNING!! This command went through the entire system and changed the group to everything on the system with the groupname. It doesn't matter where you run this from.

This is hear to just remind me and others to be carefull when running recursive commands.

I am sure you have your own stories.

tedfordgif 03-19-2005 01:02 AM

It doesn't matter where you run it from, it matters where you send it to. In other words, you're telling it to start at the root of the filesystem (/) and recurse (-R) everywhere.

And thankfully I don't have any -R stories of my own...


All times are GMT -5. The time now is 06:40 PM.