linux learning process
September 4, 2019
File Systems Command
- pwd view the current directory
- ls command
ls |
Output is the list in alphabetical order of (but not sorted according to the column line sorting) |
ls -a |
Show hidden files |
ls -R |
(Recursive) |
ls -l |
Output long list |
ls -F |
Distinguish between files and directories |
ls -l my_script |
Filtering the output list, query a specific file name (where? Represents one character, * code of zero or more characters) |
Mixing a plurality of common parameters used such as:
ls -alF
touch |
Create a file |
cp source destination |
Copy files |
cp -i source destination |
Prompted to overwrite the source file |
cp /etc/NetwirkMa/ss/s.conf . |
Copy the files in a directory of the very long in the current directory (current directory with (.) Decimal point) |
Learn to use the man command
such as man cp man ls command to see the detailed parameters
- Tab-completion of both command keys
- Link files (symbolic link (soft link) and hard links)
ln -s data_file s1_data_file |
Create a symbolic (soft) link |
ln data_1 data_2 |
ln no additional parameters to create a hard link |
mv fall fzll |
Rename the file but the time stamp remains unchanged |
mv fzz Picture/ |
Move the file to a directory Picture |
mv -i fzz pic/ |
In the case of covering the situation will prompt |
mv /home/wx/pic/fall /home/wx/fell |
Move the folder location and changed the name |
rm -i fall |
i is suggesting is not really to be deleted. Trash bash shell is not really deleted is gone |
rm -f f?ll |
Forced to delete without prompting |
mkdir NewDir |
Create a new directory |
mkdir -p new_dir / sub_dir / uder_dir |
Creating multiple subdirectories use or will be error parameters p |