home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 105,863 of 107,822   
   Paul to Bengt T   
   Re: How to set group:owner to all direct   
   16 Feb 24 18:41:59   
   
   From: nospam@needed.invalid   
      
   On 2/16/2024 9:04 AM, Bengt T wrote:   
   > Suppose that tmp_dir_1, tmp_dir_2 and tmp_dir_3 do not exist. With "mkdir -p   
   tmp_dir_1/tmp_dir_2/tmp_dir_3" the following is created:   
   >   
   > !-- tmp_dir_1   
   > ....!-- tmp_dir_2   
   > ........!-- tmp_dir_3   
   >   
   > The group:owner of all tmp_dir_...-s are set the group:owner of the user   
   generating the "mkdir..." the command.   
   >   
   > How to set group:owner to others, for all tmp_dir_...-s, directly in a   
   script with command(s), without having to manually   
   > do so afterwards?   
   >   
      
   J.O. Aho has given you the answer.   
      
   Here are some one-liner commands from my notes file.   
      
      find /media/sample -type d -exec ls -al -1 -d {} + > /mnt/tem   
   /directories.txt   
      find /media/sample -type f -exec ls -al -1    {} + > /mnt/temp/filelist.txt   
      
   Just be careful when crafting material like this, that you do not   
   accidentally lose access to the area you are working in. Sometimes,   
   the order you execute a series of one-liners, has consequences.   
      
   For an amateur administrator, creating a "sample tree" for practicing   
   the commands, is a good idea. Then, only the small sample area is   
   damaged by your mistake. Rather than a large tree of files that   
   will take a lot of time to correct.   
      
   Even how a partition is mounted, matters. It's possible for example,   
   for a partition to be mounted in such a way, that gratuitous usage   
   of "sudo" does not work. So the very first thing you do as an   
   amateur admin, is check how a partition is mounted, the exact command used.   
   To see if the mount happens to be a "tricky one". An obvious case of a   
   tricky mount, is a read-only mount, where you won't be changing any   
   permissions or ownership, any time soon. You can remount rw to fix that.   
      
      Paul   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca