command of linux(1)

创建命令

1.创建目录

mkdir(make directory) 目录名 例:mkdir 123

mkdir 目录名1/目录名2 例:mkdir 123/456(1和2目录相邻)

2.创建文档

gedit 文档名称 例:gedit 1.c

3.创建快捷方式

ln -s linked-file link-name

打开命令(cd)

1.打开当前目录的子目录

cd name-of-directory

2.打开当前目录的父目录

cd ..

3.打开home目录

cd

4.打开某个用户的home目录

cd ~bill

复制命令

1.在当前目录下复制文件

cp sourse-file dest-file

2.复制多个文件到目录

cp file1 file2 directory

3.复制目录内的所有项目

cp -r source-dir dest-dir

rsync -a source-dir/ dest-dir/

删除命令

1.删除文件或快捷方式

rm file1 link1

2.删除空目录

rmdir dir

3.删除非空目录

rm -rf dir

打印命令

1.打印当前目录地址

pwd

2.打印所有文件(不以.开头)

ls

3.列出所有信息

ls -l

4.列出所有文件(包括以.开头)

ls -a

5.按时间顺序

ls -t

6.按大小

ls -S

7.反序

ls -r

8.越新的越往后

ls -ltr

9.列出名字里有bug的

ls *bug*

10.列出结尾有.的

ls *.?

连接命令(直接显示在命令界面)

1.连接文件

cat file1 file2

2.连接文件但是有分隔

more file1 file2

3.连接所有

cat *

4.连接所有隐藏文件(以.开头)

cat .*

4.连接所有以log为后缀

cat *.log

重命名命令

mv source-file dest-file

Linux命令可以一行命令执行多个命令,例如ls -a -l等效于执行ls -a+ls -l

时间: 2024-08-06 19:17:53

command of linux(1)的相关文章

Understanding the Top command on Linux

Article by AlexioBash published on his website about ArchLinux in italian. Know what is happening in "real time" on your systems is in my opinion the basis to use and optimize your OS. On ArchLinux or better on GNU/Linux in general thetopcommand

Using Android Phone to recover SD card formatted with DD command under linux

1. Formatted a sd card with dd command under linux 2.insert the sd card into an android phone,certainly the card is not find and used.. 3 reset the android phone with format sd card option. 4.the sd card is ok!

Creating a keytab file for the Kerberos service account (using the ktutil command on Linux)

https://docs.tibco.com/pub/spotfire_server/7.13.0/doc/html/TIB_sfire_server_tsas_admin_help/GUID-27726F6E-569C-4704-8433-5CCC0232EC79.html This method of creating a keytab file on Linux uses the ktutil command. Prerequisites Kerberos is installed on

User and Group command in Linux

本文梳理了一下Linux用户和用户组的常用的一些命令. 相关的配置文件: /etc/group 存储当前系统中所有用户组信息 /etc/gshadow 存储当前系统中所有用户组的密码 /etc/passwd 存储当前系统中所有用户的信息 /etc/shadow 存储当前系统中所有用户的密码信息 配置文件的内容格式说明: 说明:在使用cat /etc/group查看的时候,你会发现有的组最后是不显示用户列表的.那么如何查看用户组的用户名单列表,下面有code. 用户组的添加,修改,删除 group

find command in linux terminal

Say you want to search for files with keyword as "keyword". find / -name keyword 2> /dev/null

Linux tar command usage

Linux tar command usage */--> Linux tar command usage Table of Contents 1. Create an archive: 2. Create a gzipped archive: 3. List the files in an archive 4. Add a file or directory to an existing archive The frequently used tar command are listed as

13 Basic Cat Command Examples in Linux(转) Linux中cat命令的13中基本用法

Cat (串联) 命令是Linux/Unix开源系统中比较常用的一个命令.我们可以通过Cat命令创建一个或多个文件,查看文件内容,串联文件并将内容输出到终端设备或新的文件当中,这篇文章我们将会以实例的方式讲解Linux中cat命令一些简便的用法. The cat (short for "concatenate") command is one of the most frequently used command in Linux/Unix like operating systems

三大Linux command查看CPU和Memory的使用情况

1. top command : 是linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况. 2. free command : free -m 查看内存占用情况 free -S 不间断地监控有多少内存在使用 ---------------------------------------------------------------------------------------------------------------------------------- For e

linux的基础知识

1.描述计算机的组成及其功能 计算机分为软件和硬件 软件:例如我们的系统.QQ.360等等 计算机硬件由五大部分组成:运算器.控制器.存储器.输入设备.输出设备,也就是我们生活中常见 CPU .主板.内存.硬盘.键盘.鼠标.显示器等.它们的各个具体功能如下: (1)CPU:是英语“Central Processing Unit中央处理器”的缩写,是一台计算机的运算核心和控制核心.它的功能主要 是解释计算机指令以及处理计算机软件中的数据.如今主流分AMD和Intel. (拓展IntelCPU的优点