[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating directories with sticky bit set
From: |
Angel Tsankov |
Subject: |
Re: Creating directories with sticky bit set |
Date: |
Thu, 12 Mar 2009 20:12:20 +0200 |
Greg Wooledge wrote:
> If you only ever create directories from interactive shells with
> the "mkdir" command, you could override it with a function:
>
> mkdir() {
> command mkdir "$@" &&
> chmod +t "$@"
> }
>
> (In reality you'd want to process function arguments, and remove for
> example a "-p" option before passing them along to chmod. I'll leave
> that part as an exercise.)
>
Let's say that removing '-p' is straightforward, but what about setting the
sticky bit to every newly created directory component?
Regards,
Angel Tsankov