On Sep 22 2025, "Mahish Sivan S (Nokia)" via GNU coreutils Bug Reports wrote:

> Example (if possible):
> --------------------------
> $ chmod 777 -t 30 myfile.txt
> # Grants full access to "myfile.txt" for 30 minutes
> # After 30 minutes, permissions revert to their previous state

$ chmod-t() { local m=$(stat -c %a "$2"); chmod "$1" "$2"; sleep ${3}m; chmod 
$m "$2"; }
$ chmod-t 777 myfile.txt 30

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



Reply via email to