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

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

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

    比如

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

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

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