Linux/Unix/Solaris学习笔记----常用命令整理

查看系统进程
ps -ef

查看某一进程
ps -ef|grep java
说明:java为进程名的一部分

查看系统当前路径:
pwd

修改某一文件的操作权限
chmod -R 777 filename
chmod -R 755 filename

在直接运行脚本失败时,如: ./run.sh -c all ,采用命令行:sh run.sh -c all可以运行该脚本。这是因为脚本run.sh不具备可执行的权限,所以可以考虑修改该脚本的权限后直接用:./run.sh -c all运行该脚本

将文件压缩为zip文件
zip -r destinationFileName.zip sourceFile/*

解压zip文件
unzip -r filename.zip


vi命令整理
文本编辑器是所有计算机系统中最常用的一种工具。UNIX下的编辑器有ex,sed和vi等,其中使用最为广泛的是vi,而vi命令繁多本文对常用的vi命令进行了整理。

进入vi的命令
打开或新建文件,并将光标置于第一行首
vi filename

打开文件,并将光标置于第n行首
vi +n filename

打开文件,并将光标置于最后一行首
vi + filename

打开文件,并将光标置于第一个与pattern匹配的串处
vi +/pattern filename

在上次正用vi编辑时发生系统崩溃,恢复filename
vi -r filename

打开多个文件,依次进行编辑
vi filename....filename

移动光标类命令
h 光标左移一个字符
l 光标右移一个字符
space 光标右移一个字符
Backspace 光标左移一个字符
k或Ctrl+p 光标上移一行
j或Ctrl+n 光标下移一行
Enter 光标下移一行
w或W 光标右移一个字至字首
b或B 光标左移一个字至字首
e或E 光标右移一个字至字尾
) 光标移至句尾
( 光标移至句首
) 光标移至段落开头
{ 光标移至段落结尾
nG 光标移至第n行首
n+ 光标下移n行
n- 光标上移n行
n$ 光标移至第n行尾
H 光标移至屏幕顶行
M 光标移至屏幕中间行
L 光标移至屏幕最后行
0(注意是数字零)光标移至当前行首
$ 光标移至当前行尾

屏幕翻滚类命令
Ctrl+u 向文件首翻半屏
Ctrl+d 向文件尾翻半屏
Ctrl+f 向文件尾翻一屏
Ctrl+b 向文件首翻一屏
nz 将第n行滚至屏幕顶部,不指定n时将当前行滚至屏幕顶部。

插入文本类命令
i 在光标前
I 在当前行首
a 光标后
A 在当前行尾
o 在当前行之下新开一行
O 在当前行之上新开一行
r 替换当前字符
R 替换当前字符及其后的字符,直至按ESC键
s 从当前光标位置处开始,以输入的文本替代指定数目的字符
S 删除指定数目的行,并以所输入文本代替之
ncw或nCW 修改指定数目的字
nCC 修改指定数目的行

删除命令
ndw或ndW 删除光标处开始及其后的n-1个字
do 删至行首
d$ 删至行尾
ndd 删除当前行及其后n-1行
x或X 删除一个字符,x删除光标后的,而X删除光标前的
Ctrl+u 删除输入方式下所输入的文本
dd 删除一行,下一行自动跟上来

搜索及替换命令
/pattern 从光标开始处向文件尾搜索pattern
?pattern 从光标开始处向文件首搜索pattern
n 在同一方向重复上一次搜索命令
N 在反方向上重复上一次搜索命令
:s/p1/p2/g 将当前行中所有p1均用p2替代
:n1,n2s/p1/p2/g 将第n1至n2行中所有p1均用p2替代
:g/p1/s//p2/g 将文件中所有p1均用p2替换

选项设置
all 列出所有选项设置情况
term 设置终端类型
ignorance 在搜索中忽略大小写
list 显示制表位(Ctrl+I)和行尾标志($)
number 显示行号
report 显示由面向行的命令修改过的数目
terse 显示简短的警告信息
warn 在转到别的文件时若没保存当前文件则显示NO write信息
nomagic 允许在搜索模式中,使用前面不带“/”的特殊字符
nowrapscan 禁止vi在搜索到达文件两端时,又从另一端开始
mesg 允许vi显示其他用户用write写到自己终端上的信息

最后行方式命令
:n1,n2 co n3 将n1行到n2行之间的内容拷贝到第n3行下
:n1,n2 m n3 将n1行到n2行之间的内容移至到第n3行下
:n1,n2 d 将n1行到n2行之间的内容删除
:w 保存当前文件
:e filename 打开文件filename进行编辑
:x 保存当前文件并退出
:q 退出vi
:q! 不保存文件并退出vi

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2013年最新版的强悍Unix版本Solaris 11.1系统文件,功能十分强大,不愧是真正血统的Unix系统! Oracle Announces Availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1 Delivers Oracle Database and Java Enhancements, Expanded Mission Critical Cloud Management Capabilities and Advanced Platform Features Redwood Shores, Calif – October 26, 2012 News Facts Oracle today announced general availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1. Oracle Solaris 11 is the first cloud OS that allows customers to build large-scale enterprise-class Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) clouds on a wide range of SPARC and x86 servers and Oracle engineered systems. Oracle Solaris Cluster 4.1 extends high availability and disaster recovery capabilities of Oracle Solaris and includes unique virtual cluster features supporting highly efficient application consolidation with best-in-class availability. Oracle Solaris 11 is already widely in production with thousands of customers with mission critical deployments across industries such as financial services, communications, healthcare, retail, public sector and media and entertainment. Read customer success stories about Oracle Solaris here. Oracle Solaris 11 is also gaining strong momentum among enterprise application vendors with hundreds of applications already qualified for Oracle Solaris Ready status through the Oracle PartnerNetwork (OPN). OPN members can develop, sell and implement their solutions on Oracle Solaris 11 and take advantage of specialized Oracle Solaris resources to expand their market reach. Customers and partners can quickly and safely upgrade to Oracle Solaris 11.1 using the built-in update tools and software repositories available with Oracle Solaris 11. Oracle will host a webcast on November 7, 2012 at 8 a.m. Pacific time on Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1, featuring Markus Flierl, vice president, Oracle Solaris Engineering, Core Technology and Bill Nesheim, vice president, Oracle Solaris Engineering, Platform Software. Register here. This event will also include an interactive chat with core developers of Oracle Solaris and Oracle Solaris Cluster. New and Enhanced Features in Oracle Solaris 11.1 Oracle Solaris 11.1 increases the performance, availability and I/O throughput of the latest Oracle Database technology. A new, optimized shared memory interface between the Oracle Database and Oracle Solaris 11.1 provides 8x faster database startup and shutdown, as well as online resizing of the Oracle Database System Global Area (SGA). Oracle Solaris 11.1 introduces unique new capabilities for optimizing Oracle Database performance. Oracle Solaris 11.1 exposes Oracle Solaris DTrace I/O interfaces that allow an Oracle Database administrator to identify I/O outliers and subsequently isolate network or storage bottlenecks. A new Oracle Solaris DTrace plug-in for Oracle Java Mission Control to enable customers to profile Java applications on Oracle Solaris production systems. New cloud management features add to Oracle Solaris 11’s zero overhead built-in virtualization capabilities across system, network and storage resources, including expanded support for Software Defined Networks (SDN) with Edge Virtual Bridging enhancements, to maximize network resource utilization and manage bandwidth in cloud environments. New built-in memory predictor monitors application memory use and provides optimized memory page sizes and resource location to speed overall application performance. Support for an unprecedented 32 TB of RAM and thousands of CPUs unlocks the full potential of Oracle’s latest server systems. Oracle Solaris Cluster 4.1 Highlights New Oracle Solaris 10 Zone Clusters allow customers to consolidate mission critical Oracle Solaris 10 applications on Oracle Solaris 11 cloud environments. Expanded disaster recovery operations using Oracle’s Sun ZFS Storage Appliance services along with Oracle Solaris Cluster 4.1 to coordinate failover of applications and data to a remote disaster recovery site. Faster application recovery with improved storage failure detection and resource dependencies management. New labeled security capability in Oracle Solaris Zone Clusters provides military grade application separation in highly consolidated mission-critical deployments using Oracle Solaris 11 Trusted Extensions. Integrated Oracle Deployments and Support Oracle Enterprise Manager Ops Center provides comprehensive cloud management capabilities for Oracle Solaris 11, including self-service provisioning of Oracle Solaris 11 Zones. Ops Center’s integrated systems management delivers enterprise scale cloud performance. Oracle Enterprise Manager Ops Center is available to Oracle Solaris customers at no additional cost under the Ops Center Everywhere Program. Oracle Solaris Studio delivers the latest in compiler optimizations, multithread performance and powerful analysis tools for native development, and optimized application performance and reliability on Oracle Solaris 11.1 systems. Oracle Solaris 11 guarantees binary compatibility with previous Oracle Solaris versions through the Oracle Solaris Binary Application Guarantee Program, which provides customers a seamless upgrade path and the industry’s best investment protection. Oracle Solaris Legacy Containers allows older Oracle Solaris environments to be brought forward onto latest generation hardware to provide power, cooling and footprint consolidation savings. OPN members can find Oracle Solaris tools and resources in the Oracle Solaris Knowledge Zone, including Oracle Solaris Ready, Oracle Solaris 11 Specialization and Oracle Solaris Development Initiative. The Oracle Solaris Remote Lab now provides a secure cloud environment for OPN members to test and validate their applications with Oracle Solaris 11 in SPARC and x86 virtual environments. Supporting Quotes “Oracle recommends Oracle Solaris 11 for all UNIX®-based Oracle implementations. Oracle Solaris 11.1 delivers over 300 new performance and feature enhancements and is engineered together with Oracle Database, middleware, applications to increase performance, streamline management and automate support for Oracle deployments,” said John Fowler, executive vice president, Systems, Oracle. “The combination of the secure, highly available capabilities of Oracle Solaris Cluster 4.1 and the built-in virtualization of Oracle Solaris 11.1 helps customers bring their most mission-critical applications into a cost effective, agile cloud environment and delivers extreme availability for enterprise applications.” “Clients are looking for ways to reduce the complexity of systems management while enabling Platform as a Service (PaaS) & Software as a Service (SaaS) clouds,” says Lee Diamante, solutions architect, Systems Computing Solutions at Forsythe. “The value of Oracle Solaris 11 is that it maintains all the enterprise-class features expected with a mission-critical OS, while bringing in new, innovative technologies. Forsythe has a long and rich history of delivering customer solutions on Oracle Solaris systems. This is why we are excited about the Solaris 11.1 release.” “Oracle is making it much easier for partners like Informatica to gain access to their software with the new testing environments; shrinking the time to measurable results and value,” said Julie Lockner, vice president, ILM, Informatica. “With the release of Oracle Solaris 11.1 Informatica customers now have access to mission critical deployments across major industries, with an environment of high performance and high availability. With all the new feature enhancements, we look forward to making the Informatica Platform certified on the Oracle Solaris 11 product family.”

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值