Home Forums HDFS Howto show hidden file or directory?

This topic contains 1 reply, has 1 voice, and was last updated by  Tri Nguyen 3 months, 4 weeks ago.

  • Creator
    Topic
  • #56849

    Tri Nguyen
    Participant

    Hi,

    Using HDP 2.1.2 I have created a snapshot by:

    hdfs dfsadmin -allowSnapshot /user/myTestDir1
    hdfs dfs -createSnapshot /user/myTestDir1
    Console Output: Created snapshot /user/myTestDir1/.snapshot/s20140704-101231.886

    Let’s say I forgot later that /user/myTestDir1 contains snapshots. I would like to list the entire content of that path, including hidden files or folders, by using:

    hdfs dfs -ls /user/myTestDir1

    But the hidden directory .snapshot is not visible. To see it’s content I must explicitly specify the path of the hidden directory

    hdfs dfs -ls /user/myTestDir1/.snapshot/

    QUESTION: Can you please suggest a way to list hidden file / directory in HDFS?
    Thanks in advance for any help

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #56850

    Tri Nguyen
    Participant

    I wonder how to edit my previous post. The choice of snapshot in the example might be misleading as the command “hdfs lsSnapshottableDir” would show all the snapshottable paths.

    My question was generic and not really related to snapshot. I would like to know if there is a way to list hidden files or directories (having a dot prefixing the name).

    Thanks and can you please also show me how to edit my own posts?

    Collapse
Viewing 1 replies (of 1 total)