Hadoop has a special file system called 'hdfs' where there is no concept of current or present working directory. And therefore, the hdfs does not support 'cd' command (in short, it is not required). To navigate through the directories in hdfs, the complete path should be provided. This can be done with 'hdfs dfs -ls <path>' command.
Suppose you have a directory named test2 under a directory named test. Now, to view the contents of the test2 directory in hdfs you can execute the below command,
hdfs dfs -ls test/test2
Now, if you have a .txt file in the directory test2 and you want to display the .txt file, then execute the below command,
hdfs dfs -cat test/test2/text_file_name.txt