Viewing, copying, moving and deleting files查看,复制,移动和删除文件
ls LS | Display the contents of the current directory显示当前目录的内容 |
ls -a LS - A | Display also hidden files and hidden directories显示还隐藏文件和隐藏目录 |
cp filename /path/dir_name CP文件名/路径/ dir_name | Copy filename into directory /path/dir_name复制到目录/ path / dir_name文件名 |
cp -r dir_name /path/dir_name2 CP - R dir_name / path/dir_name2 | Copy the entire dir_name into /path/dir_name2复制整个dir_name到/ path/dir_name2 |
cp filename1 filename2 /path/dir_name CP文件名文件名/路径/ dir_name | Copy filename1 and filename2 into /path/dir_name复制文件名和文件名到/路径/ dir_name |
rm name RM名称 | Remove a file or directory called name删除名为name的文件或目录 |
rm -r name RM - R名称 | Remove an entire directory as well as its included files and subdirectories删除整个目录以及其包含的文件和子目录 |
linux建立文件系统的命令 mv filename /path/dir_name MV文件名/路径/ dir_name | Move filename into /path/dir_name移动到文件名/路径/ dir_name |
mv filename1 filename2 MV文件名1文件名2 | Rename filename1 to filename2重命名文件名到文件名 |
cat filename猫文件名 | Display filenames contents显示文件名的内容 |
more filename更多的文件名 | Display filename in pages.显示在页面的文件名。 Use spacebar to view next page使用空格键查看下一页 |
head filename头文件名 | Display filenames first 10 lines显示文件名的前10行 |
head -15 filename头-15文件名 | Display filenames first 15 lines显示文件名,第15行 |
tail filename尾部的文件名 | Display filenames last 10 lines显示文件名的最后10行 |
tail -15 filename尾-15文件名 | Display filenames last 15 lines显示文件名的最后15行 |
pwd PWD | Display current directory显示当前目录 |
cd /path/dir_name CD /路径/ dir_name | Change to directory /path/dir_name切换到目录/ path / dir_name |
cd .. CD .. | Go 1 directory up转到第1目录 |
mkdir dir_name MKDIR dir_name | Create directory dir_name创建目录dir_name |
rmdir dir_name RMDIR dir_name | Delete directory dir_name删除目录dir_name |
Finding files and text within files在文件内查文件和文本
updatedb updatedb | Update (create first time used) a database of all files under the root directory /更新(创建第一次使用)的根目录/下的所有文件数据库 |
locate filename到文件名 | Find file filename searching in the database在数据库中查文件的文件名搜索 |
find / -name filename到/名的文件名 | Starting from the root directory search for the file called filename开始从根目录搜索文件名为filename |
find / -name *filename /名*文件名 | Same as above but search for file containing the string filename以上,但搜索同样含有字符串的文件名的文件 |
grep string /path/dir_name grep的字符串/路径/ dir_name | Starting from /path/dir_name search for all files containing string从/路径/ dir_name搜索所有含有字符串的文件 |
which application_name这APPLICATION_NAME | Search $path for application app_name搜索应用程序APP_NAME $ PATH |
whereis application_name whereis APPLICATION_NAME | Search $path, man pages and source files for application_name搜索路径,手册页和源文件APPLICATION_NAME |
Archived files归档文件
Decompress 解压缩
tar -焦油 | 乱世三义在线完整版播放 Decompress tzg file解压缩TZG文件 |
tar -xzf 焦油xzf | file解压缩的文件 |
tar -xjf filename.tar.bz2焦油- xjf filename.tar.bz2 | Decompress tar.bz2 file解压缩tar.bz2文件 |
Compress 压缩
tar -czf filename.tar /path/dir_name焦油CZF filename.tar /路径/ dir_name | Compress directory /path/dir_name to filename.tar压缩目录/ path / dir_name以filename.tar |
gzip -c filename > GZIP - C文件名> | Compress /path/dir_name to 压缩/路径/ dir_name |
bzip2 -c filename > filename.bz2 bzip2的- C文件名> filename.bz2 | Compress /path/dir_name to filename.tar.bz2压缩/路径/ dir_name filename.tar.bz2 |
fastjson转listUsing rpm files使用RPM文件
rpm -hiv package.rpm RPM - HIV package.rpm | Install rpm called package.rpm安装rpm称为package.rpm |
rpm -hiv --force package.rpm RPM - HIV - 力package.rpm | Install rpm called package.rpm by force安装rpm呼吁用武力package.rpm |
rpm -hUv package.rpm RPM - HUV package.rpm | Upgrade rpm called package.rpm升级称为package.rpm RPM |
rpm -e package.rpm RPM - Ë package.rpm | Delete rpm called package.rpm删除RPM称为package.rpm |
rpm -qpil package.rpm RPM - qpil package.rpm | List files in not-installed rpm called package.rpm在未安装的RPM列表文件名为package.rpm |
rpm -ql package.rpm RPM - QL package.rpm | List files in installed rpm called package.rpm在安装的RPM列表文件名为package.rpm |
rpm -q str RPM - q STR | List installed rpms containing the string str列出已安装的RPM包含字符串str |
rpm -qf /path/application_name RPM - QF /路径/ APPLICATION_NAME | Display the rpm that contains application application_name显示RPM包含应用程序APPLICATION_NAME |
Starting and Stoping启动和回采
startx运行startx | Start the X system启动X系统 |
shutdown -h now执行shutdown - h现在 | Shutdown the system now and do not reboot关闭系统,不重新启动 |
halt停止 | Same as above同上 |
shutdown -r now现在执行shutdown - r | Reboot重新启动 |
reboot重新启动 | Same as abovewidechartomultibyte linux同上 |
shutdown -r +10执行shutdown - R +10 | Reboot in 10 minutes在10分钟内重新启动 |
Mounting filesystems挂载文件系统
mount -t vfat /dev/sd(a)(1) /mnt/c_drive VFAT装入- T /开发/ SD(一)(1)到/ mnt / C_DRIVE | Mount the first partition 1 of the first hard disk drive a which is in fat32 vfat dormat under /mnt/c_drive directory安装的第一个硬盘驱动器的第一分区1一个到/ mnt / C_DRIVE目录下,在FAT32 VFAT dormat |
mount -t iso9660 /dev/cdrom /mnt/cdrom ISO9660贴装- T /开发/ CDROM到/ mnt / CDROM | Mount cdrom under /mnt/cdrom directory山CDROM在/ mnt / cdrom目录 |
umount /mnt/hda1使用umount / mnt/hda1 | Unmout the above Unmout的上述 |
User administration用户管理
users用户 | Display users currently logged in显示用户当前登录 |
adduser username adduser的用户名 | Create a new user called username所谓的用户名创建一个新用户 |
passwd username passwd用户名 | Define password for user called username定义为用户名为用户名的密码 |
who谁 | List logged-in users登录用户列表 |
whoami WHOAMI | Display current user显示当前用户 |
finger username手指的用户名 | Displays info about user username显示对用户的用户名信息 |
su苏 | Log in as root from current login从当前登录作为root登录 |
su -苏 - | Log in as root from current login and take root's path从当前登录作为root登录,并采取根的路径 |
exit退出 | Exit from console login (ie, logout).从控制台登录(即注销)退出。 |
Processes流程
lambda是不是保留字command命令 | Execute command in the foreground在前台执行的命令 |
command &命令& | Execute command in the background在后台执行命令 |
ctrl+z CTRL + Z | Suspend a program暂停程序 |
ctrl+c CTRL + C | Interrupt a program中断程序 |
ps PS | List all processes列出所有进程 |
kill -9 pid杀死-9 PID | Kill process with id pid杀死进程ID PID |
top顶部 | Monitor processes in real time在实时监控过程 |
Networking网络
hostname主机名 | List the system's hostname列出系统的主机名 |
ifconfig使用ifconfig | Set/Display network information设置/显示网络信息 |
host ip主机的IP | Resolves ip's hostname解析IP的主机名 |
ping ip/hostname平的IP /主机名 | Check if ip/hostname is reachable检查IP /主机名是可到达 |
traceroute ip/hostname traceroute的IP /主机名 | Find network path to ip/hostname到网络路径,IP /主机名 |
System Information系统信息
uname -a uname - a的 | General system information一般系统信息 |
fdisk -l FDISK - L | List partition tables分区表 |
cp filename /path/dir_name CP文件名/路径/ dir_name | Copy filename into directory /path/dir_name复制到目录/ path / dir_name文件名 |
df -T -h DF - T - H | List filesystem disk space usage文件系统磁盘空间使用情况 |
lspci lspci的 | List PCI devices列出PCI设备 |
lsusb lsusb | List USB devices列出USB设备 |
free -m自由米 | Display RAM+Swap usage显示RAM +交换使用数学log的运算法则 |
Program Compile程序编译
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论