`

Ubuntu command

阅读更多

#svn command
svn co address defineName
svn info
svn st
svn ci  javascript/comprofile.js -m'fixed brand alert defect'
svn st (svn status path)
#After the change in .bashrc
#mci means the command of mvn clean install
#mee means the command of mvn eclipse:eclipse

#modify the hosts file,used for DNS (domain name resolution )
cat etc/hosts
sudo gedit /etc/hosts

#alias command
~/.bashrc file is used for defining the alias command.
alias mci='mvn clean install -Dmaven.test.skip'
alias mee='mvn eclipse:eclipse'

#find something in file which is used vi to open.
use vi command to open file, and press / to put the pattern string to find the matched string.

#unzip tar file
tar xvzf
tail -n -500f one.log
tail -f 命令可用于监视另一个进程正在写入的文件的增长。
tail -n Number 从首行或末行位置来读取指定文件,位置由 Number 变量的符号(+ 或 - 或无)表示
http://hi.baidu.com/fx1168/blog/item/b358a8510fe4fd2243a75b4b.html

#more command
more,类似 cat,不过会以一页一页的显示方便使用者逐页阅读,而最基本的指令就是按空白键(space)就往下一页显示,按 b 键就会往回(back)一页显示,而且还有搜寻字串的功能(与 vi 相似),使用中的说明文件,请按 h 。

#Use svn to compare with each other file
select a file and press the ctrl,select another file and click the right key to each other of compare list.

#make apahce of 64bit available
chown root:root httpd/ -r
chown root:root.This command changes the ownership of some installed files, the result of building the package as a user other than root
chmod +s httpd/ -r
chmod +s:

  s 在文件执行时把进程的属主或组ID置为该文件的文件属主。

       方式“u+s”设置文件的用户ID位,“g+s”设置组ID位。


On POSIX-compliant and UNIX systems, this stands for setuid on execution or setgid on execution permission. On Windows systems, this stands for a system file.
=====
我将要文件给一个peter的人
在我的电脑上输入
sftp peter@10.16.74.1
password:
put filename
10.16.74.1是对方的ip,然后让对方输入密码,接下来我就可以将文件put到peter的home目录。

sudo tar xvzf apache2.tar.gz –C /usr/local
将解压的文件copy到/usr/local目录下

====

#!/bin/bash

# check if root run the script
if [ `id -u` = 0 ]
then
    echo "****************************************************"
    echo "*Error: root (the superuser) can't run this script.*"
    echo "****************************************************"   
    exit 1
fi

# determine base directory; preserve where you're running from
cd `dirname $0`/..
BASE=`pwd`

chmod +x $BASE/bin/ -R

$BASE/bin/jbossctl start
the below is comment:

# check if root run the script
if [ `id -u` = 0 ]
then
    echo "****************************************************"
    echo "*Error: root (the superuser) can't run this script.*"
    echo "****************************************************"   
    exit 1
fi

note:
http://www.basicconfig.com/linux-commands/linux-id-command-tutorial


2.
# determine base directory; preserve where you're running from
cd `dirname $0`/..
BASE=`pwd`

note:
$0当前Shell程序的文件名
dirname $0,获取当前Shell程序的路径
cd `dirname $0`,进入当前Shell程序的目录

3.linux中shell变量$#,$@,$0,$1,$2的含义解释
http://www.itwis.com/html/os/linux/20100202/7373.html

分享到:
评论

相关推荐

    ubuntun linux command line

    对于ubuntu的使用做了详细的介绍,一些命令做了介绍。

    Ubuntu上支持chkconfig命令

    现在ubuntu上,默认是不支持chkconfig命令的,但支持自己安装,需要自己去下载对应的安装包。 方法:在存放该文件的目录下执行:dpkg -i chkconfig_11.0-79.1-1ubuntu1_all.deb

    ubuntu-command.rar_ubantu

    很全的ubantu命令集,初学者不防看一下

    Ubuntu下终端命令

    Ubuntu下终端命令语句语法查询,LINUX终端命令,Ubuntu下终端命令,Red Hat下终端命令

    ubuntu SVN命令大全

    ubuntu SVN命令大全 ubuntu SVN命令大全 ubuntu SVN命令大全 ubuntu SVN命令大全

    Sams.Ubuntu.Unleashed.Aug.2006.part1

    Part I: Installation and Configuration Chapter 1 Introducing Ubuntu Chapter 2 Preparing to ... Chapter 33 Command Line Masterclass Chapter 34 Advanced apt Chapter 35 Kernel and Module Management

    ubuntu8.04

    书中提供了大量 shell-command 实例,它们涵盖系统管理的方方面面,包括的主题有:Ubuntu 的基本概念、系统安装提示、Ubuntu 软件包管理、Ubuntu 中的 Linux 内核、系统微调、建立网关、文本编辑器、CVS、程序设计、...

    ubuntu linux设置静态ip

    第一步、执行su,输入root密码进入特权模式。 第二步、添加DNS服务器IP。 第三步、重启网络。 第四步、验证。

    Ubuntu Pocket Guide and Reference: A concise companion for day-to-day Ubuntu use

    Next, the command-line is tackled in-depth, after which software management is explained. Finally, system security is described. Appendixes provide a glossary, and a guide to technical documentation....

    ubuntu中文参考手册

    书中提供了大量 shell-command 实例,它们涵盖系统管理的方方面面,包括的主题有:Ubuntu 的基本概念、系统安装提示、Ubuntu 软件包管理、Ubuntu 中的 Linux 内核、系统微调、建立网关、文本编辑器、CVS、程序设计、...

    PGP Command Line 10.3.2 MP11 KeyGen

    PGP Command Line 是一款加密工具,可加密大量的批处理信息、维护备份过程安全,用户能在自动运行脚本中插入PGP加密和数字签名功能,确保信息在传递、存储或备份过程中的安全。这是PGP的命令行工具.允许组织对秘密...

    Beginning Ubuntu Linux Part1

    Beginning Ubuntu Linux is split into seven parts, each of which contains chapters about a certain aspect of Ubuntu use. These parts can be read in sequence, or you can dip in and out of them at will. ...

    Beginning Ubuntu Linux Part2

    Beginning Ubuntu Linux is split into seven parts, each of which contains chapters about a certain aspect of Ubuntu use. These parts can be read in sequence, or you can dip in and out of them at will. ...

    Ubuntu Unleashed 2012 Edition: Covering 11.10 and 12.04 (7th Edition)

    Administer and use Ubuntu from the command line Automate tasks and use shell scripting Provide secure remote access Manage kernels and modules Administer file, print, email, proxy, LDAP, and ...

    ubuntu终端命令

    这是一些基本的ubuntu终端命令,个人认为命令行还是要多操作,多用几次就记住了就熟练了。 熟悉ubuntu环境下的终端命令 有助于更高效便捷地在ubuntu下工作。

    安装arm-linux-gcc-4.4.3 Ubuntu linux_方法即出现的问题解决

    安装arm-linux-gcc-4.4.3 Ubuntu linux_方法即出现的问题解决

    Ubuntu使用手册(中文)

    You can specify multiple streams on the commandline. They will be enqueued in the playlist. The first item specified will be played first. Options-styles: --option A global option that is set for ...

    dmidecode命令的deb包

    支持在ubuntu系统上安装dmidecode命令所需的deb包,安装方式: dpkg -i dmidecode_2.12-2_amd64.deb

Global site tag (gtag.js) - Google Analytics