编程岁月

软件开发技术心得+笔记

Set up ssh password less key across all the servers for genesys service account

 Login den-genqa-014 by genesysadmin user,  run : ssh-keygen -t rsa -b 2048 (to create a key pair under /home/genesysadmin/.ssh/. Don't ...

2016-01-07 17:18:13

阅读数:1055

评论数:0

linux环境变量 export命令详解

 由host $ export DVSDK="${HOME}/ti-dvsdk_dm368-evm_xx_xx_xx_xx"引发的问题 1、${HOME}:首先, HOME 是个变量,它代表你的 home 目录,变量前必须加上 $ 符号,否则会报错 usr/local...

2016-01-06 16:55:25

阅读数:672

评论数:0

Linux下如何查看系统启动时间和运行时间

1.uptime命令 输出:16:11:40 up 59 days, 4:21, 2 users, load average: 0.00, 0.01, 0.00 2.查看/proc/uptime文件计算系统启动时间 cat /proc/uptime 输出: 5113396.94 575...

2015-08-08 00:09:24

阅读数:382

评论数:0

Git 常用命令大全

Git 是一个很强大的分布式版本控制系统。它不但适用于管理大型开源软件的源代码,管理私人的文档和源代码也有很多优势。 Git常用操作命令: 1) 远程仓库相关命令 检出仓库:$ git clone git://github.com/jquery/jquery.git ...

2015-07-08 00:05:07

阅读数:359

评论数:0

How to access system messages in Linux? Does Linux have something like Windows Event Log?

Title     How to access system messages in Linux? Does Linux have something like Windows Event Log?   Information     Windows has Event ...

2015-04-20 22:40:52

阅读数:255

评论数:0

Linux下SSH使用rsa认证方式省去输入密码

使用Linux主机生成的密匙 1、生成密匙 [root@www.linuxidc.com .ssh]#ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key ...

2015-04-17 18:58:33

阅读数:225

评论数:0

How do I grab an INI value within a shell script?

I have a parameters.ini file, such as: [parameters.ini]     database_user    = user     database_version = 20110611142248 I want to read in and u...

2014-05-10 14:32:49

阅读数:471

评论数:0

How to start weblogic managed servers without manually entering the password

While starting a managed server in weblogic, we start with below command.     1 /bin/startManagedWebLogic.sh soa_server1 t3://localhost:7001 ...

2014-05-10 14:30:33

阅读数:638

评论数:0

-bash: ./my_script: /bin/bash^M: bad interpreter: No such file or directory

26down voteaccepted   I have seen this issue when creating scripts in Windows env and then porting over to run on a unix environment. Try running...

2014-05-10 14:27:46

阅读数:595

评论数:0

bash split string into array

In a bash script I would like to split a line into pieces and put them into an array. The line: Paris, France, Europe I would like to have them in...

2014-05-10 14:25:52

阅读数:1161

评论数:0

How to check the first character in a string in unix

Many ways to do this. You could use wildcards in double brackets: str="/some/directory/file" if [[ $str == /* ]]; then echo 1; else ech...

2014-05-10 14:22:50

阅读数:640

评论数:0

Linux Bash script to remove files older than 3 days

Can someone help me with a bash script to remove files older than 3 days in directory /u1/database/prod/arch?

2014-05-10 14:10:40

阅读数:561

评论数:0

Oracle Weblogic nodemanager STOP script Bash and Python

Everyone who is using Oracle Weblogic must had a thought like  “Where the *** is the stop script to kill my nodemanager proces”…. Well, i did. So i w...

2014-05-10 14:07:44

阅读数:646

评论数:0

Linux Grep OR, Grep AND, Grep NOT Operator Examples

Question: Can you explain how to use OR, AND and NOT operators in Unix grep command with some examples?   Answer: In grep, we have options equivale...

2014-05-10 14:05:59

阅读数:749

评论数:0

Start and Stop Oracle Weblogic NodeManager Via Shell Alias

Start and Stop Oracle Weblogic NodeManager via Shell Alias  This tip is to create two simple bash shell environment alias for starting and stoping W...

2014-05-10 14:03:26

阅读数:518

评论数:0

How do I determine if a web page exists with shell scripting?

Under a *NIX, you can use curl to issue a simple HEAD request (HEAD only asks for the headers, not the page body): curl --head http://myurl/ Then...

2014-05-10 14:01:39

阅读数:436

评论数:0

Listing only directory using ls in bash

This command lists directory in the current path: ls -d */ What exactly the pattern */ does? And how can we give absolute path in the above command...

2014-05-10 13:58:32

阅读数:532

评论数:0

【转】linux shell -- 块注释

使用#可以注掉一行脚本,但shell没有提供类似c语言/* */的成块注释符。所以shell中的块注释只能通过一些技巧实现。 1. 使用here document : 语句块 block 这里的block是标识符,可以自定义。注意不要与语句块中的字符产生冲突。 解释: 最前面的:表示...

2014-05-06 18:47:34

阅读数:683

评论数:0

在Linux中用source,dot(.)和直接用脚本文件名执行shell脚本的区别 .

用source,dot(.)的方式执行shell脚本的时候,不产生子进程,shell脚本在当前的shell中运行,shell脚本运行完成后,在shell脚本中声明的变量在当前的shell中是可见的. 直接用脚本文件名的方式执行shell脚本的时候,产生子进程,shell脚本在子进程中运行,she...

2014-05-06 18:45:19

阅读数:628

评论数:0

[转]linux shell 获取当前正在执行脚本的绝对路径

原文链接:http://sexywp.com/bash-how-to-get-the-basepath-of-current-running-script.htm   常见的一种误区,是使用 pwd 命令,该命令的作用是“print name of current/working direct...

2014-05-06 18:41:16

阅读数:548

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭