ディレクトリを別の名前に置き換えることによって、ディレクトリ名を変更できます。ディレクトリ名の変更には mv コマンドを使います。
$ pwd /home/user2/veggies $ ls broccoli $ mv broccoli carrots $ ls carrots |
mv コマンドを使って、ディレクトリをすでにある別のディレクトリ内に移動することもできます。
$ pwd /home/user2/veggies $ ls carrots $ mv carrots ../veggies2 $ ls ../veggies2 carrots |
この例では、mv コマンドを使って、carrots ディレクトリを veggies から veggies2 に移動しています。