hadoop study notes (X): hdfs basic operation command in the command line (including viewing and uploading and downloading of files hdfs etc.)

hdfs command line 
    ( 1 ) View help 
        hdfs DFS - Help 
        
    ( 2 ) to view the current directory information 
        hdfs DFS -ls / 
        
    ( . 3 ) uploaded 
        hdfs DFS -put / local path / hdfs path 
        
    ( 4 ) to cut the file 
        hdfs DFS -moveFromLocal A .txt / aa.txt 
        
    ( . 5 ) the download to 
        HDFS DFS - GET / path HDFS / local path 
        
    ( 6 ) combined download 
        HDFS DFS -getmerge / HDFS path of the folder / file after the merger 
        
    ( . 7 ) create folder
        DFS hdfs -mkdir / Hello 
        
    ( . 8 ) to create multi-level folder 
        hdfs DFS -mkdir -p / Hello / World 
        
    ( . 9 ) move files hdfs 
        hdfs DFS -MV / hdfs path / hdfs path 
        
    ( 10 ) to copy the file hdfs 
        hdfs DFS -cp / hdfs path / hdfs path 
        
    ( 11 ) to delete the file hdfs 
        hdfs the DFS -rm / aa.txt 
        
    ( 12 ) to delete the folder hdfs 
        hdfs the DFS -rm -r / the Hello 
        
    ( 13 ) to view files in hdfs 
        hdfs the DFS -cat / file 
        hdfs the DFS -tail -f / file 
        
    ( 14 ) to see how many files folder there 
        hdfs dfs -count / folder 
        
    ( 15 ) to view the total space hdfs of 
        hdfs dfs -df / 
        hdfs dfs -df -h / 
        
    ( 16 ) to modify the number of copies     
        hdfs dfs - setrep 1 / a.txt
    

 

Guess you like

Origin www.cnblogs.com/isme-zjh/p/11622807.html