Question about using chown recursively

Discussion in 'Linux Beginners' started by TheKnown, Feb 24, 2026 at 6:49 AM.

  1. TheKnown

    TheKnown New Member

    Hi everyone, I’m currently learning Linux and had a question about using the chown -R command. What is the safest way to test ownership changes before applying them to important directories? I want to avoid accidentally changing system files. Any best practices would be appreciated.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Create a test directory with some files and practice chown on them.
    Code:
    mkdir /tmp/TestDir
    pushd /tmp/TesDir
    touch A
    touch B
    touch C
    ls -lh
     

Share This Page