Hadoop File System commands

You can execute Hadoop file system commands using CLI on your cluster.

  • Access your cluster by using the URL of the container.
    abfs://<NAME OF CONTAINER>@<NAME OF ACCOUNT>.dfs.core.windows.net/
  • Create a directory using the mkdir command. For example,
    hadoop fs -mkdir abfs://abfscontainer@abfstorageacc.dfs.core.windows.net/myDir/
    hadoop fs -ls abfs://abfscontainer@abfstorageacc.dfs.core.windows.net/
    
    Found 2 items
    
    drwxr-xr-x - root root 0 2020-05-20 15:14
    abfs://abfscontainer@abfstorageacc.dfs.core.windows.net/myDir
    drwxr-x--- - root root 0 2020-05-20 12:50
    abfs://abfscontainer@abfstorageacc.dfs.core.windows.net/test

    Similarly, you can use the put command to add a file to one of the directories, ls command to list the items in your cluster, and cat command to read the contents of the file.