Methods of deleting files with spaces in Linux

Andy86666 2022-06-24 07:18:10 阅读数:439

methodsdeletingfilesspaceslinux

Linux Method for deleting files with spaces in

Want to delete today HDFS Files with spaces in
 Insert picture description here
Direct use hadoop fs -rm -r /user/bigdata/json out, The following error will appear
 Insert picture description here

terms of settlement

Method 1

Use wildcards to solve * and ?

hadoop fs -rm -r /user/bigdata/json?out

 Insert picture description here

Supplementary knowledge :
* Match all characters
Matches any character

Method 2

Enclose the file name in quotation marks

hadoop fs -rm -r /user/bigdata/'json out'

 Insert picture description here

copyright:author[Andy86666],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/175/202206240137255604.html