-2

I tried changing the owner and group of all files and directories Vincent and staff respectively in my terminal but its not working.

I tried using chown -R Vincent:staff*...

2 Answers2

1

You can use wildcard to change the owner of both files and directories like:

chown -R Vincent:staff <path>/*

Or if you want to give different owners to files and directories then you can use find to select the files and directories:

For files:

find <path>/ -type f -exec chown Vincent:staff {} \;

For directories:

find <path>/ -type d -exec chown Vincent:staff {} \;

You can use the same commands to run chmod, if you want to change the permissions.

Raman Saini
  • 365
  • 1
  • 11
-1

What is exactly the command that you used? The following one should run:

chown -R Vincent:staff myfolder/*
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Dhrions
  • 11
  • 4