現在のディレクトリにファイルをコピーしても、そのファイルやディレクトリは存在しません。

現在のディレクトリにファイルをコピーしても、そのファイルやディレクトリは存在しません。

複数のフォルダのファイルを現在のディレクトリにコピーしようとしています。ターミナルでこれを実行しながら、完全な位置を指定すると機能することがわかりました。

joostin@ubuntu:~$ cp ~/unixstuff/vol/examples/tutorial/science.txt .

しかし、unixstuffフォルダに入って現在のフォルダに直接入れようとすると、エラーが発生します。何が起こったのか知っていますか?

joostin@ubuntu:~$ cd unixstuff
joostin@ubuntu:~/unixstuff$ cp /vol/examples/tutorial/science.txt .
cp: cannot stat ‘/vol/examples/tutorial/science.txt’: No such file or directory

ベストアンサー1

/volというディレクトリはありませんがvol(スラッシュなし)なので試してみてください。

 cp vol/examples/tutorial/science.txt .

おすすめ記事