删除名称为’–exclude=workspace’的文件

  • 2018-02-01
  • 218
  • 7
  • 0

【为什么会产生这个文件】

 


因为执行了错误的tar命令格式。

错误命令:

tar zcvf --exclude=workspace jenkin.tar.gz jenkins/

正确命令:

tar zcvf  jenkin.tar.gz jenkins/ --exclude=workspace

 

尝试删除:

[root@test data]#rm -rf --exclude\=workspace
rm: unrecognized option '--exclude=workspace'
Try 'rm ./'--exclude=workspace'' to remove the file ‘--exclude=workspace’.
Try 'rm --help' for more information.
[root@test data]#rm -rf "\-\-exclude\=workspace"
[root@data data]#ls
application-data  docker  --exclude=workspace  jenkins    logs

 

尝试重命名:

[root@test data]#mv '--exclude=workspace' 1
mv: unrecognized option '--exclude=workspace'
Try 'mv --help' for more information.
[root@test data]#mv "\-\-exclude=workspace" 1
mv: cannot stat ‘\\-\\-exclude=workspace’: No such file or directory

 

【解决】


# 方法一:使用FileZilla,通过sftp连接,直接删除文件。
# 方法二:用全路径:
rm -rf "/data/--exclude=workspace"

 

评论

  • Stepstarp回复

    Propecia Hormone Propecia 1 De 50 viagra Buy Letrozole Paypal Cheapest Viagra Prices Licensed Pharmacies

  • Stepstarp回复

    Viagra And Cialis Cheap Mejor Que Viagra п»їcialis No Prescription Discount Pharmacy Dutasteride Avolve Bangor Kamagra Australian Customs

  • Stepstarp回复

    Sildenafil Citrate 100mg Plus viagra Viagra Biaxin Interaction Dosage Adjust

  • Stepstarp回复

    Il Cialis Migliora viagra Propecia Indesiderati Viagra Vendita Italia What Is Amoxicillin Used For

  • Stepstarp回复

    Where To Order Viagra viagra Association Cialis Viagra Kamagra Oral Jelly Online Australia

  • Stepstarp回复

    Generic Viagra Accepts Echeck Comment Prendre Le Cytotec levitra on sale Viagra Rezeptfrei Preis Prix Cialis Super Active Wirkung Cialis Erfahrung

  • Stepstarp回复

    Propecia Msd Kaufen Viagra From Europe Viagra Acheter En Ligne France viagra Cheap Acyclovir Topical Amoxicillin For Cats Amoxicillin Dosage Bladder Infection