September 11 2017 File::Path Security Back

rm -rf versus rm -r: What's the Difference?

        $ mkdir -p /tmp/alpha/beta
        $ chmod 0000 /tmp/alpha/beta
        $ ls -l /tmp/alpha/
        total 4
        d--------- 2 jkeenan jkeenan 4096 Jul 20 12:22 beta
        $ rm -r /tmp/alpha/beta
        rm: descend into write-protected directory '/tmp/alpha/beta'? y
        rm: remove write-protected directory '/tmp/alpha/beta'? y
        $ ls -l /tmp/alpha/
        total 0


Home Last TOC Copyright © 2017 James E Keenan Back Next