Online SSH Client from C9.io

Categories: Development NotesLinux; Tagged with: ; @ March 23rd, 2014 1:14

Access your server via. online https SSH Client: https://c9.io

image

 

Btw, C9’s online IED is awesome,  take a look it’s html editor:

image

How to get exit code in CDM

Categories: Scripts; Tagged with: ; @ January 14th, 2013 15:18

Requirement:

Need to catch the exit code, handle the Error based on the exit code.

Solution:

Use %ErrorLevel% – Almost all applications will set an exit code when complete (by conversion, 0 means successful).

 

Example 1:
copy file1.txt file3.txt
ECHO ...%ErrorLevel%

copy fileNotExisting.txt f.txt
ECHO %ErrorLevel%

Output:

“1 file(s) copied”
0

“The system cannot find the file specified.”
1

 

Example 2:

SET SSIS_EXIT_CODE=%ErrorLevel%
copy "%PKG_PATH%\Logs\….dtsx.log" ..
IF %SSIS_EXIT_CODE% NEQ 0 (
    EXIT /B %SSIS_EXIT_CODE%
)

 

Links:

http://ss64.com/nt/errorlevel.html
http://ss64.com/nt/exit.html

How to check the exit code of the last command in batch file?

Backup SVN repository using svnadmin dump 使用svnadmin dump备份SVN资料库

Categories: Development NotesLinux; Tagged with: ; @ June 27th, 2012 15:40

svnadmin dump ./repository/project > /home/backup/project_backup.svn.dump

manual: http://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.dump.html

Run Shell command using PHPShell in your shared host

Categories: PHP; Tagged with: ; @ June 23rd, 2012 13:19

PHP has a shell_exec command: “Execute command via shell and return the complete output as a string ” http://php.net/manual/en/function.shell-exec.php

And here is a project: http://phpshell.sourceforge.net/

PHP Shell

PHP Shell is a shell wrapped in a PHP script. It’s a tool you can use to execute arbitrary shell-commands or browse the filesystem on your remote webserver. This replaces, to a degree, a normal telnet connection, and to a lesser degree a SSH connection.

You use it for administration and maintenance of your website, which is often much easier to do if you can work directly on the server. For example, you could use PHP Shell to unpack and move big files around. All the normal command line programs like ps, free, du, df, etc… can be used.

Download and config phpShell,, and then upload to your server, then you can run shell!

http://phpshell.sourceforge.net/

Linux查看及修改时区

Categories: Linux; Tagged with: ; @ December 26th, 2010 23:03

查看当前时区
date –R

修改时区: 调整时区到东八区 – 北京时间 
[root@localhost ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
cp: overwrite `/etc/localtime’? y

Newer Posts <-> Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.