Linux common commands (i)

Source: Internet
Author: User
1, ls --list 格式:ls [选项] [目录或文件名] 常用命令选项: -l:以长格式显示 -R:表示递归显示 -A:包括以 . 开头的隐藏文档 -d:显示目录本身(而不是内容)的属性 -h:提供易懂的容量单位(K、M等) 上述常用命令亦可结合使用: 例:ls -lA /etc 以长格式的方式显示/etc下的所有内容2, pwd--Print Working Directory 用途:查看当前工作目录3,cd — Change Directory 用途:切换工作目录 格式:cd [目标文件夹位置]4,touch a/b/c 创建空格文件5,mkdir 新建目录 格式:mkdir 新建目录名称 mkdir -p表示递归,如果没有前置目录,也会帮你自动创建前置目录 6,rm --remove删除命令 格式:rm [选项]... 文件或目录... 常用命令选项 -r、-f:递归删除(含目录)、强制删除7,mv--move 移动/改名 格式: mv [选项]... 原文件... 目标路径 重命名:路径不变的移动8,cp--copy复制 格式:cp [选项]... 原文件... 目标路径 常用命令选项 -r:递归,复制目录时必须有此选项 -p:保持原文件的权限、修改时间等属性不变 9 ,cat:查看文件里面的内容 tac:查看文件里面的内容,倒序 cat -n 查看文件里面的内容并显示行号10 , head:默认查看文件的前10行内容 head -n 查看文件的前n行内容 tail:默认查看文件的后10行内容 tail -n 查看文件的后n行内容

Linux common commands (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.