COMMAND 命令 |
DESCRIPTION 注解 |
Files and Directory 文件及目录 |
cd /home |
enter to directory '/ home' 进入/home目录 |
cd .. |
go back one level 向上返回一个目录 |
cd ../.. |
go back two levels 向上返回两个目录 |
cd |
go to home directory 前往/home目录 |
cd ~utente |
go to home directory 前往/home目录 |
cd - |
go to previous directory 进入先前所在目录 |
pwd |
show the path of work directory 显示目录路径 |
ls |
view files of directory 显示目录内包含的文件 |
ls -F |
view files of directory 显示目录内包含的文件 |
ls -l |
show details of files and directory 显示目录内文件的详细信息 |
ls -a |
show hidden files 显示隐藏文件 |
ls *[0-9]* |
show files and directory containing number 显示目录内包含有数字的文件 |
lstree |
show files and directories in a tree starting from root 以树形显示文件 |
mkdir dir1 |
create a directory called 'dir1' 建立dir1目录 |
mkdir dir1 dir2 |
create two directories simultaneously 建立两个目录 |
mkdir -p /tmp/dir1/dir2 |
create a directory tree 建立目录树 |
rm -f file1 |
delete file called 'file1' 删除名为file1的文件 |
rmdir dir1 |
delete directory called 'dir1' 删除名为dir1的目录 |
rm -rf dir1 |
remove a directory called 'dir1' and contents recursively 删除dir1目录及所含文件 |
rm -rf dir1 dir2 |
remove two directories and their contents recursively 删除dir1 dir 2两个目录及所含文件 |
mv dir1 new_dir |
rename / move a file or directory 重命名/移动 文件或文件夹 |
cp file1 file2 |
copying a file 复制文件 |
cp dir/* . |
copy all files of a directory within the current work directory 复制目录及目录内所有文件到当前目录 |
cp -a /tmp/dir1 . |
copy a directory within the current work directory 复制目录到当前目录 |
cp -a dir1 dir2 |
copy a directory 复制目录 |
ln -s file1 lnk1 |
create a symbolic link to file or directory 建立文件或目录的符号链 |
ln file1 lnk1 |
create a physical link to file or directory 建立文件或目录的物理链 |
touch -t 0712250000 fileditest |
modify timestamp of a file or directory - (YYMMDDhhmm) 修改文件或目录的时间戳 - 格式:YYMMDDhhmm |
linux commands line v1.0 - LinuxGuide.it linux命令详解翻译 - moon-blog.cn |