Yes, the chown command can be used to change the ownership of files without affecting their subdirectories by omitting the -R (recursive) option.
For example, if you want to change the ownership of all files in a directory but not the subdirectories, you can run:
sudo chown user:group /path/to/directory/*
This command will change the ownership of all files directly within the specified directory but will leave any subdirectories unchanged.
If you want to change ownership for a specific file, you can simply specify that file:
sudo chown user:group filename
If you have further questions or need more examples, feel free to ask!
