hdfs dfs
HDFS has a feature where whatever the file that you delete, it will get moved into trash, which acts like a recycle bin. that is controlled with 2 properties,
Trash interval and Trash interval checkpoint whatever the value that we have within the trash interval, for that particular interval, the file will be kept in a .trash folder under the user directory.
Let us check how to perform the task
This step may be performed from any node within the cluster Sign-on and authenticate as the user you wish to clear out the Trash folder for
$sudo su –
Let us add a sample File in hdfs
$hdfs dfs -put test.txt /trashtest.txt
You can list the files in hdfs using
$hdfs dfs -ls
Now let us remove the file using