Linux Basic operations:
PWD Displays the current directory
ll is used to view files and directories, the list, whose parameters are more
-l lists data strings, including file attributes and permission data, etc.
-A lists all files, including hidden files
-d lists only the directory itself, not the file data under the list directory
-H The file capacity is listed in an easy-to-read manner, such as gb,kb
-R recursively lists the contents of this directory and its subdirectories
CP is copy for copying files, can be multiple files disposable skin to a directory
MV is move for moving files, directories, renaming
Cp-a file1 file2 with all the features of file1 copy the file as File2
CP file1 file2 dir1 copy files 1 and 2 to dir directory
Mv-f forced override
Mv-i if the target file exists, ask if the overwrite operation is performed
RM Delete files or directories
-F Force Delete without warning
-R Recursive Delete, most commonly used directory delete, dangerous parameters
-I interactive operation that asks the user whether to delete when deleting
Instance
Rm-i file deletes files and asks if delete is done when deleting
RM-RF file forcibly deletes all files in the directory dir
PS & netstat & Kill
Netstat. Used to view network port status, for example, to see if the 50070 port of Hadoop is running
PS is used to display the progress of the process at a point in time, PS that is process
Kill is used to pass a contact signal to a job or to a process (PID)
Tar is used to package files, which are not compressed by default and require a given parameter, and the associated compression program (GZIP/BZIP) is called to compress and decompress the parameters as follows
-C New Package file
-T view what file names are included in the packaged file
-X unpack or decompress
-j compression or decompression via bZIP
-Z Compress or decompress via gzip
Instance
TAR-ZXF hadoop-2.7.2.tar.gz Hadoop-2.7.2
Basic Linux Operations--notes