【问题标题】:Switch two file names?切换两个文件名?
【发布时间】:2011-04-03 01:13:03
【问题描述】:

在 unix 中有没有一种方法可以轻松/自动切换两个文件的文件名?

文件:

  • 文件1
  • 文件2

想切换file2命名为file1,file1命名为file2

【问题讨论】:

    标签: unix


    【解决方案1】:
    >mv file1 temp
    >mv file2 file1
    >mv temp file2
    

    【讨论】:

    猜你喜欢
    • 2016-07-21
    • 2012-08-20
    • 1970-01-01
    • 1970-01-01
    • 2013-06-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多