HDFS Delete Directories: hadoop fs -rmdir

The hadoop fs -rmdir
command is used to delete a directory in Hadoop Distributed File System (HDFS).
In this blog post, we will explore the hadoop fs -rmdir
command’s usage and its most commonly used flags with examples to help you become proficient in deleting directories in HDFS.
Another command, hadoop fs -rm
, provides an extended range of capabilities and serves as a versatile option for deleting both files and directories. For a comprehensive understanding of the hadoop fs -rm
command, you can refer to the content covered in this blog post.
Command Syntax:
hadoop fs -rmdir [options] <path>
path
: The path to the directory to be deleted.options
: The following options are available:-f
: Force the deletion, even if the directory is not empty.- Example:
hadoop fs -rmdir -f /user/hadoop/mydir
- Example:
Remove Empty Directory
This basic usage of the command removes the specified empty directory from HDFS.
hadoop fs -rmdir <path>
Example:
In this example, the command removes the empty directory named empty_dir
from the /user/hadoop/
directory in HDFS.
hadoop fs -rmdir /user/hadoop/empty_dir/
Forceful Removal (-f)
The -f
flag allows you to forcefully remove the directory, even if it’s not empty.
hadoop fs -rmdir -f <path>
Example:
By using the -f
flag, the command forcefully removes the directory non_empty_dir
even though it contains files.
hadoop fs -rmdir -f /user/hadoop/non_empty_dir/
7 Comments
HDFS Delete Directories: hadoop fs -rmdir – ashwin.cloud
mefpfispbp http://www.gf1s3lyrru470mw55ai3488x6g430s0cs.org/
amefpfispbp
[url=http://www.gf1s3lyrru470mw55ai3488x6g430s0cs.org/]umefpfispbp[/url]
Water Well Steel Casing Pipe
Tactical Medical Kit
ブランドコピー時計電池
モンクレールスーパーコピー
Nail Tip
What is the best material for the cabinet
Vinyl Cutter Plotter Plotters
ブランドコピーシーツ通販
What is a fact about hand cream
Malathion 57 Ec
Halogen-free PCB
ブランドコピー日本国内発送
Warehouse Gantry Crane
様国内発送最高級スーパーコピー時計が満載国内発送佐川急便100は安全に到着します100客は気に入ります
TU-752 High-speed PCB
ブランドコピー激安通販
Modern Outdoor Lighting Sconces
Solid Carbide Drill Bits