Can chown be used with wildcards?

QuestionsQuestions8 SkillsProPermissions of FilesNov, 14 2025
099

Yes, the chown command can be used with wildcards in Linux. For example, you can change the ownership of multiple files that match a certain pattern. Here’s an example:

hdfs dfs -chown new_user /home/hadoop/underwater/*.txt

In this command, all .txt files in the specified directory will have their ownership changed to new_user. Just ensure that you use wildcards carefully to avoid unintended changes.

0 Comments

no data
Be the first to share your comment!