If the target file or directory exists the command will fail. If the input is a directory then the whole directory tree is copied. azdata bdc hdfs cpĬopy a file or directory between the local machine and HDFS. Name of the file or directory to change owner of. azdata bdc hdfs chown -owner hdfs -group superusergroup -path "tmp/test.txt" azdata bdc hdfs chown -path -pĬhange the owner and group. azdata bdc hdfs chownĬhange the owner or group of the specified file. Name of the file or directory to set permissions on. azdata bdc hdfs chmod -permission 775 -path "tmp/test.txt" azdata bdc hdfs chmod -path -pĬhange file or directory permission. azdata bdc hdfs chmodĬhange the permission on the specified file or directory. Number of bytes offset within the file to read. Offset and length in bytes are optional parameters. azdata bdc hdfs create -path "tmp/test.txt" -data "This is a test."Ĭontent of the file. azdata bdc hdfs create -path -pĬreate file. Simple text content can be added via data parameter. azdata bdc hdfs createĬreate the text file at the specified location. azdata bdc hdfs mv -source-path "tmp/" -target-path "dest/" Move the specified file or path to the specified location. azdata bdc hdfs mkdirĬreate a directory at the specified path. azdata bdc hdfs exists -path -pĬheck for file or directory existance. Returns True if exists and False otherwise. azdata bdc hdfs existsĭetermine if a file or directory exists. List Status azdata bdc hdfs ls -path "tmp/" List the status of the given file or directory. Increase logging verbosity to show all debug logs. The HDFS shell is a simple interactive command shell for HDFS file system. Manage mounting of remote stores in HDFS. Offset and length in bytes are optional parameters.Ĭhange the permission on the specified file or directory.Ĭhange the owner or group of the specified file.Ĭopy a file or directory between the local machine and HDFS. Move the specified file or path to the specified location.Ĭreate the text file at the specified location. Returns True if exists and False otherwise.Ĭreate a directory at the specified path. List the status of the given file or directory.ĭetermine if a file or directory exists. For more information about other azdata commands, see azdata reference Commands Command The following article provides reference for the sql commands in the azdata tool. We can get list of FS Shell commands with below hadoop fs -help Once the hadoop daemons are started running, HDFS file system is ready and file system operations like creating directories, moving files, deleting files, reading files and listing directories. Below are the basic HDFS File System Commands which are similar to UNIX file system commands. This entry was posted in Hadoop and tagged hadoop commands hadoop file system commands hadoop fs appendtofile hadoop fs cat command hadoop fs chmod example hadoop fs chown example hadoop fs commands hadoop fs commands with examples hadoop fs count quota hadoop fs cp directory hadoop fs cp overwrite hadoop fs df hadoop fs du human readable hadoop fs examples hadoop fs expunge hadoop fs get command hadoop fs get copytolocal hadoop fs get directory hadoop fs get example hadoop fs get multiple files hadoop fs get overwrite hadoop fs getmerge example hadoop fs list all files hadoop fs liststatus hadoop fs ls hadoop fs ls file size hadoop fs ls options hadoop fs mkdir recursive hadoop fs put command hadoop fs put multiple files hadoop fs put options hadoop fs put overwrite hadoop fs remove folder hadoop fs rm directory hadoop fs rm skiptrash hadoop fs setrep w example hadoop fs stat format hadoop fs tail hadoop fs test example hadoop fs touchz example hdfs command hdfs shell commands on Apby SivaĬommand Line is one of the simplest interface to Hadoop Distributed File System.