mv了N次才成功

    一不小心, 在Linux上生成了这样一个文件.

-ftmp_iw_user.txt

    试了很多下mv/cp命令, 都不行, 没有成功, 出现的错误提示也很怪, 搞不懂了.

$ mv *.txt tmp_iw_user.txt
mv: invalid option -- t
Try `mv --help' for more information.

    在前面加个目录试试?

$ mv "./-ftmp_iw_user.txt" tmp_iw_user.txt

    终于成功了.

tmp_iw_user.txt

    中间会想到, 用Windows就好了, 图形下改, 不用这么麻烦, 修改成功后又觉得Linux也很好.

留言 (3)

昨天也遇到一样的问题,用了管道来删除了

前几天也遇到一样的问题,两种方法删除

mv -- -ftmp_iw_user.txt tmp_iw_user.txt
or
mv ./-ftmp_iw_user.txt tmp_iw_user.txt

mv -- -ftmp_iw_user.txt tmp_iw_user.txt

发表留言:

« Previous | Main | Next »

英语900句 | English 900

  • Just a moment.
  • 等一会儿.
  • Hold on.
  • 等一会儿.
  • He's not in. May I take a message for him?
  • 他不在, 我能替他捎个口信吗?
  • Yes, please.
  • 是的, 麻烦了.
  • Would you answer the phone please?
  • 你能接下电话吗?