grep 命令使用(2)
grep 引數-w 精準匹配查詢的內容並輸出所在行
[[email protected] scripts]#cat sedtext
qwerrrr
wewq
wew1
erw
wew
[[email protected] scripts]#grep "wew" sedtext
wewq
wew1
wew
[[email protected] scripts]#grep -w "wew" sedtext
wew
grep -n ".*" 顯示行號輸出 “.*” 代表任意字元
[[email protected] scripts]#grep -n ".*" sedtext
1:qwerrrr
2:
3:wewq
4:wew1
5:erw
6:wew wweweweefd
7:wew weww
8:wew
grep -E 或egrep 可以使用正則表達
[[email protected] scripts]#egrep -w "wew|fds" sedtext
wew wweweweefd
wew weww
wew
fds
相關推薦
Linux的經常使用命令(2) - 關機
計算機 pan spa 技術 eboot 使用 content con .net 關機命令 shutdown?h now 馬上進行關機 shutdown?r now 如今又一次啟動計算機 -t sec : -t後面加秒數,即”過幾秒後關機” -k : 不是要真
Linux基礎系列:常用命令(2)
用戶和組 查看 -- tdi 作業二 其他 配置文件 解鎖 gid 1 作業一: 2 1) 新建用戶natasha,uid為1000,gid為555,備註信息為“master” 3 groupadd -g 555 natasha 4 useradd -u
linux 基礎命令 (2)
網絡 linux 1、alias 定義或者顯示別名eg:alias date=‘date "+%F %T"‘當我們輸入date的時候,其實就相當於輸入date "+%F %T",簡單方便;但是,這個別名只是在當前shell進程中生效,一旦我們退出再登陸,這個別名就不會再生效。 解決方法就是
Shell、內外部命令——Linux基本命令(2)
linux1.ShellShell是Linux系統的用戶界面,提供了用戶與內核進行交互操作的一種接口。它接收用戶輸入的命令並把它送入內核去執行.shell也被稱為LINUX的命令解釋器(commandinterpreter).vshell是一種高級程序設計語言.
常見的SQL命令(2)
oracle sql 語句 創建學生情況表:student create table student(st_class CHAR(8),st_no CHAR(10) NOT NULL,st_name CHAR(8) NOT NULL,st_sex CHAR(2),st
《Linux學習並不難》Linux網絡命令(2):ifconfig命令顯示和配置網絡接口
Linux ifconfig 27.2 《Linux學習並不難》Linux網絡命令(2):ifconfig命令顯示和配置網絡接口使用ifconfig命令可以顯示和配置網絡接口,比如設置IP地址、MAC地址、激活或關閉網絡接口。命令語法:ifconfig [接口] [選項| IP地址]命令中各選項的含
Linux常用命令(2)
Linux 常用命令 1.# 表示權限用戶(如:root),$ 表示普通用戶開機提示ogin:輸入用戶名password:輸入口令 用戶是系統註冊用戶成功登陸後,可以進入相應的用戶環境.退出當前shell,輸入:exit 2.useradd netseek 添加一個netseek用戶passwd
每天一個不熟悉的linux命令(2)——sort
linux 基礎命令 這個命令是幹什麽的? sort的英文意思為“分類”“排序”,一句話概括,它的作用就是將文件進行排序並輸出。 1.命令格式:用法一:sort [選項]... [文件]... 用法二:sort [選項]... --files0-from=F 2.命令參數: 常用的參數:-r, --r
簡單了解Linux命令(2)
完整性 led pkg misc form fast wav proc 復制 RPM 包 – (Fedora, Redhat及類似系統) rpm -ivh package.rpm 安裝一個rpm包 rpm -ivh –nodeeps package.rpm 安裝一個rpm包
七月八號linux學習筆記-常見的linux命令(2)
swd login tail 讀取 操作 文件權限 bzip2 嵌套 diff 五,文本編輯命令1.cat命令 用於查看內容較少的的純文本 格式為"cat [選項][文件]"2.more命令 用於查看內容較多的的純文本 格式為"more
linux系統終端命令(2)
一相對路徑和絕對路徑 絕對路徑:最前面是/或〜,表示相對於根目錄或家目錄的完整路徑 相對路徑表示相對於當前工作目錄的路徑 二觸和mkdir和rm命令擴充套件 觸控如果檔案不存在,則建立檔案;如果檔案存在,修改檔案的末次修改日期 mkdir -pa / b / c / d可以
Linux基礎命令(2)
(2) 備份與恢復文件1.使用壓縮和解壓縮工具(1)gzip預設會刪除原檔案-d 解壓縮-#: 指定壓縮比,壓縮比越小,速度越大解壓:gunzip例:壓縮文字a.txt[[email protected]~]#gzip a.txt[[email protected]~]# ls -lh a
標號(3):python(就業階段)——Linux系統命令(2)——《遠端登入和遠端拷貝》
二、遠端登入和遠端拷貝 <1>ssh介紹 >(1)SSH(Secure Shell)是專為遠端登入會話和其他網路服務提供安全性的協議。常用於遠端登入,以及使用者之間進行資料拷貝。 (2)SSH 為建立在應用層和傳輸層基礎上的安全協議。 (3)利用SSH協議可以有效防止遠端管
python(就業階段)——Linux系統命令(2)——《遠端登入和遠端拷貝》
二、遠端登入和遠端拷貝 <1>ssh介紹 (1)SSH(Secure Shell)是專為遠端登入會話和其他網路服務提供安全性的協議。常用於遠端登入,以及使用者之間進行資料拷貝。 (2)SSH 為建立在應用層和傳輸層基礎
Linux基本命令(2)有關磁碟空間的命令
檔案來源: 有關磁碟空間的命令 命令 功能 mount 掛載檔案系統 umount 解除安裝已掛載上的檔案系統 df 檢查各個硬碟分割槽和已掛上來的檔案系統的磁碟空間 du 顯示檔案目錄和大小 fsck 主要是檢
liunx常用命令(2)
1、ls的許可權問題 drwxrwxr-x d代表資料夾 -代表檔案 rwx rwx r-x r可讀 w可寫 x執行 第一組指檔案的擁有者的許可權,第二組代表檔案擁有的組的許可權,第
每天一個Linux命令(2):cd命令
cd命令可以說是Linux中最基本的命令語句,其他的命令語句要進行操作,都是建立在使用cd命令上的。所以,學習Linux 常用命令,首先就要學好cd命令的使用方法技巧。 1. 命令格式: cd [目錄名] 2. 命令功能: 切換當前目錄至dirN
linux 命令系列之目錄處理命令(2)
mkdir :make directories 建立資料夾 -p 建立遞迴資料夾 eg: mkdir -p /tmp/test/linux/aaa 建立多個資料夾 eg: mkdir /tmp/test1 /tmp/test2 /tmp/
每天一個linux命令(2):unrar
解壓rar檔案。 unrar -? Usage: unrar <command> -<switch 1> -<switch N> <archive> <files...>
grep 命令使用(2)
grep 引數-w 精準匹配查詢的內容並輸出所在行 [[email protected] scripts]#cat sedtext qwerrrr wewq wew1 erw wew [[email protected] scripts]#grep "wew" sedtext