linux命令大全
linux命令大全--广州北大青鸟五羊新城学校免费教你学电脑cat cd
chmod chown
cp cut
名称:cat
使用权限:所有使用者
使用方式:cat [-AbeEnstTuv] [--help] [--version] fileName
说明:把档案串连接后传到基本输出(萤幕或加 > fileName 到另一个档案)
参数:
-n 或 --number 由 1 开始对所有输出的行数编号
-b 或 --number-nonblank 和 -n 相似,只不过对于空白行不编号
-s 或 --squeeze-blank 当遇到有连续两行以上的空白行,就代换为一行的空白行
-v 或 --show-nonprinting
范例:
cat -n textfile1 > textfile2 把 textfile1 的档案内容加上行号后输入 textfile2 这个档案里
cat -b textfile1 textfile2 >> textfile3 把 textfile1 和 textfile2 的档案内容加上行号(空白行不加)之后将内容附加到 textfile3
名称 : cd
使用权限 : 所有使用者
使用方式 : cd [dirName]
说明 : 变换工作目录至 dirName。 其中 dirName 表示法可为绝对路径或相对路径。若目录名称省略,则变换至使用者的 home directory (也就是刚 login 时所在的目录)。
另外,"~" 也表示为 home directory 的意思,"." 则是表示目前所在的目录,".." 则表示目前目录位置的上一层目录。
范例 : 跳到 /usr/bin/ :
cd /usr/bin
跳到自己的 home directory :
cd ~
跳到目前目录的上上两层 :
cd ../..
指令名称 : chmod
使用权限 : 所有使用者
使用方式 : chmod [-cfvR] [--help] [--version] mode file...
说明 : Linux/Unix 的档案存取权限分为三级 : 档案拥有者、群组、其他。利用 chmod 可以藉以控制档案如何被他人所存取。
把计 :
mode : 权限设定字串,格式如下 : [ugoa...][[+-=][rwxX]...][,...],其中u 表示该档案的拥有者,g 表示与该档案的拥有者属于同一个群体(group)者,o 表示其他以外的人,a 表示这三者皆是。
+ 表示增加权限、- 表示取消权限、= 表示唯一设定权限。
r 表示可读取,w 表示可写入,x 表示可执行,X 表示只有当该档案是个子目录或者该档案已经被设定过为可执行。
-c : 若该档案权限确实已经更改,才显示其更改动作
-f : 若该档案权限无法被更改也不要显示错误讯息
-v : 显示权限变更的详细资料
-R : 对目前目录下的所有档案与子目录进行相同的权限变更(即以递回的方式逐个变更)
--help : 显示辅助说明
--version : 显示版本
范例 :将档案 file1.txt 设为所有人皆可读取 :
chmod ugo+r file1.txt
将档案 file1.txt 设为所有人皆可读取 :
chmod a+r file1.txt
将档案 file1.txt 与 file2.txt 设为该档案拥有者,与其所属同一个群体者可写入,但其他以外的人则不可写入 :
chmod ug+w,o-w file1.txt file2.txt
将 ex1.py 设定为只有该档案拥有者可以执行 :
chmod u+x ex1.py
将目前目录下的所有档案与子目录皆设为任何人可读取 :
chmod -R a+r *
此外chmod也可以用数字来表示权限如 chmod 777 file
语法为:chmod abc file
其中a,b,c各为一个数字,分别表示User、Group、及Other的权限。
r=4,w=2,x=1
若要rwx属性则4+2+1=7;
若要rw-属性则4+2=6;
若要r-x属性则4+1=7。
范例:
chmod a=rwx file
和
chmod 777 file
效果相同
chmod ug=rwx,o=x file
和
chmod 771 file
效果相同
若用chmod 4755 filename可使此程式具有root的权限
指令名称 : chown
使用权限 : root
使用方式 : chmod [-cfhvR] [--help] [--version] user[:group] file...
说明 : Linux/Unix 是多人多工作业系统,所有的档案皆有拥有者。利用 chown 可以将档案的拥有者加以改变。一般来说,这个指令只有是由系统管理者(root)所使用,一般使用者没有权限可以改变别人的档案拥有者,也没有权限可以自己的档案拥有者改设为别人。只有系统管理者(root)才有这样的权限。
把计 :
user : 新的档案拥有者的使用者 IDgroup : 新的档案拥有者的使用者群体(group)-c : 若该档案拥有者确实已经更改,才显示其更改动作-f : 若该档案拥有者无法被更改也不要显示错误讯息-h : 只对于连结(link)进行变更,而非该 link 真正指向的档案-v : 显示拥有者变更的详细资料-R : 对目前目录下的所有档案与子目录进行相同的拥有者变更(即以递回的方式逐个变更)--help : 显示辅助说明--version : 显示版本
范例 :
将档案 file1.txt 的拥有者设为 users 群体的使用者 jessie :
chown jessie:users file1.txt
将目前目录下的所有档案与子目录的拥有者皆设为 users 群体的使用者 lamport :
chmod -R lamport:users *
名称:cp
使用权限:所有使用者
使用方式:
cp [options] source dest
cp [options] source... directory
说明:将一个档案拷贝至另一档案,或将数个档案拷贝至另一目录。
最强的师资!最好的设备!我信赖:北大青鸟(五羊新城学校)网络工程师培训中心咨询电话:87318662传真:87601353地址:广州市越秀区达道路12号金达大厦三楼 注意:更多的精彩的电脑\网络\安全知识详情请访问学校网站: [url]http://www.gz-jb.com.cn[/url]查询。
雇帮狗仔队 做“一日明星”
**** 作者被禁止或删除 内容自动屏蔽 ****好,支持你的!
哈哈原来是这样呀![color=black]这里真的不错,只有[/color][url=http://www.8v8.org.cn][color=black]企业名录[/color][/url][color=black]是不够的吧,还得做好[/color][url=http://www.v3v.org.cn][color=black]网络营销[/color][/url][color=black]工作的吧!哎这里[/color][url=http://www.vip6.org.cn][color=black]命中注定我爱你[/color][/url][color=black]了,哦了![/color]
linux 电子书免费下载
学习下----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[list][*][url=http://www.51cnnet.com/ebook/167-linux]Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/120-hardening-linux]Hardening Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/239-linux-cookbook]Linux Cookbook ebook free download[/url][*][url=http://www.51cnnet.com/ebook/282-linux-on-the-mainframe]Linux on the Mainframe ebook free download[/url][*][url=http://www.51cnnet.com/ebook/291-linux-unwired]Linux Unwired ebook free download[/url][*][url=http://www.51cnnet.com/ebook/389-linux-phrasebook]Linux: Phrasebook ebook free download[/url][*][url=http://www.51cnnet.com/ebook/930-inside-linux]Inside Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/941-practical-linux]Practical Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1223-suse-linux]Suse Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1656-fedora-linux]Fedora Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/63-linux-clustering-building-and-maintaining-linux-clusters]Linux Clustering: Building and Maintaining Linux Clusters ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1-linux-kernel-in-a-nutshell]Linux Kernel in a Nutshell ebook free download[/url][*][url=http://www.51cnnet.com/ebook/52-linux-server-hacks]Linux Server Hacks ebook free download[/url][*][url=http://www.51cnnet.com/ebook/74-linux-power-tools]Linux Power Tools ebook free download[/url][*][url=http://www.51cnnet.com/ebook/90-understanding-the-linux-kernel]Understanding the Linux Kernel ebook free download[/url][*][url=http://www.51cnnet.com/ebook/91-linux-security-cookbook]Linux Security Cookbook ebook free download[/url][*][url=http://www.51cnnet.com/ebook/113-advanced-linux-networking]Advanced Linux Networking ebook free download[/url][*][url=http://www.51cnnet.com/ebook/169-advanced-linux-programming]Advanced Linux Programming ebook free download[/url][*][url=http://www.51cnnet.com/ebook/217-user-mode-linux]User Mode Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/300-linux-enterprise-cluster]Linux Enterprise Cluster ebook free download[/url][*][url=http://www.51cnnet.com/ebook/468-professional-linux-programming]Professional Linux Programming ebook free download[/url][*][url=http://www.51cnnet.com/ebook/526-managing-raid-on-linux]Managing RAID on Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/611-linux-system-programming]Linux System Programming ebook free download[/url][*][url=http://www.51cnnet.com/ebook/646-linux-system-administration]Linux System Administration ebook free download[/url][*][url=http://www.51cnnet.com/ebook/892-integrating-linux-and-windows]Integrating Linux and Windows ebook free download[/url][*][url=http://www.51cnnet.com/ebook/911-troubleshooting-linux-firewalls]Troubleshooting Linux Firewalls ebook free download[/url][*][url=http://www.51cnnet.com/ebook/931-linux-network-servers]Linux Network Servers ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1052-linux-programming-bible]Linux Programming Bible ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1091-java-programming-on-linux]Java Programming on Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1198-linux-programming-unleashed]Linux Programming Unleashed ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1242-linux-socket-programming]Linux Socket Programming ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1607-moving-from-windows-to-linux]Moving from Windows to Linux ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1671-linux-desktop-hacks]Linux Desktop Hacks ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1672-hardening-linux-2005]Hardening Linux (2005) ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1683-linux+-certification-bible]Linux+ Certification Bible ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1709-hacker-linux-uncovered]Hacker Linux Uncovered ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1788-linux-troubleshooting-bible]Linux Troubleshooting Bible ebook free download[/url][*][url=http://www.51cnnet.com/ebook/1791-linux-desktop-garage]Linux Desktop Garage ebook free download[/url][/list]
页:
[1]