Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
krisbai
V2EX  ›  Linux

文件名前边加了一个-,请问如何才能删除!

  •  1
     
  •   krisbai · Mar 13, 2017 · 2570 views
    This topic created in 3375 days ago, the information mentioned may be changed or developed.
    4 replies    2017-03-13 17:10:30 +08:00
    yiyiwa
        1
    yiyiwa  
       Mar 13, 2017
    加一个 ./ 就可以了

    比如

    rm -f ./-a.txt
    BOYPT
        2
    BOYPT  
       Mar 13, 2017
    rm -- -file

    --是区分功能参数和数据参数的分隔符,标准工具里面都通用

    比如
    git -a -- -a.txt -c.file
    myth
        3
    myth  
    PRO
       Mar 13, 2017
    rm -- -filename
    krisbai
        4
    krisbai  
    OP
       Mar 13, 2017
    谢谢楼上各位的热心回复。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1277 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:33 · PVG 01:33 · LAX 10:33 · JFK 13:33
    ♥ Do have faith in what you're doing.