What command can be used to confirm that a file was created?

QuestionsQuestions8 SkillsProPermissions of FilesAug, 05 2025
0120

You can use the hadoop fs -ls command to confirm that a file was created in HDFS. For example, to check if a file named test_file.txt exists, you can run:

hadoop fs -ls /

This command lists all files in the root directory of HDFS, allowing you to verify the presence of test_file.txt. If you want to check a specific path, you can specify it like this:

hadoop fs -ls /test_file.txt

If the file exists, it will display its details; if not, it will indicate that the file does not exist.

0 Comments

no data
Be the first to share your comment!