Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のことを行うエイリアスを書きたい:
private () { chmod go-rwx "$@" }
これはまさにあなたが望むことだと思います。bash だけでなく、すべての Posix シェルで動作する Posix 構文を使用してシェル関数を定義します。任意の数のファイルで機能します。
グループおよびその他からのみ rwx パーミッション ビットを削除し、ユーザーパーミッションは以前と同じままにします。