May 17
Technical

Sometime, you may want to transfer a lot of files from server to another server, you may use ftp client (command-line) to transfer. However, default ftp client is cannot transfer multiple file in multiple directory (yes, you can use `mget` command but you needs to create a directory at first). One solution that you can copy recursive from one to one is transfer a file by `wget` command.

  • wget -r --passive-ftp ftp://username:password@ftp.yourhost.com/directory

This command will transfer some files to current local directory and also create subdirectory. :-)


Posted by Scalopus+

Defined tags for this entry: , , ,

Last modified on 2008-05-17 18:04
Feb 23
Computer Science

1. How to delete all .svn with only one command

  • # find . -name ".svn" -exec rm -rf {} \;

2. SVN commit [Ref]

  • If commit by enter no comments, it may show error message that some files will be ignore to add to repository. "This line, and those below, will be ignored".
  • Try svn commit -m "commit message you want".

3. Subversion with Branch / Trunk [Ref]


4. SVN Client and Public/Private Key

  • Use Pageant of Putty package

Final: Ubuntu Service command (Management) [Ref]

  • # update-rc.d SERVICE-NAME remove

Posted by Scalopus+

Defined tags for this entry: , , ,

Last modified on 2008-02-24 11:51
Dec 14
Technical

When you are on Microsoft Windows Vista Platform. It is hard to create a script that use privilage command. One way is by use the command "Runas" as follow

C:\> Runas /user:Administrator cmd

However, the above command will ask for Administrator password before continue next process. It is not good to create automate script by using above command. After I googling for several week, I found the way to create batch script and it can use privilage command, no administrator password needs, but it will show UAC dialogbox ask to confirm an operation.

Type a text as follow in elevate.js

---------------------------------------------------

// elevate.js -- runs target command line elevated
if (WScript.Arguments.Length >= 1) {
Application = WScript.Arguments(0);
Arguments = "";
for (Index = 1; Index < WScript.Arguments.Length; Index += 1) {
if (Index > 1) {
Arguments += " ";
}
Arguments += WScript.Arguments(Index);
}
new ActiveXObject("Shell.Application").ShellExecute(Application, Arguments, "", "runas");
} else {
WScript.Echo("Usage:");
WScript.Echo("elevate Application Arguments");
}

---------------------------------------------------

Then use it as below

  • elevate cmd.exe "/t:fc /k cd /d c:\ && title ** Admin console ** "
  • elevate mybatchscript.bat
  • elevate route add ....... bra bra bra..


Hope this entry help all of you who want to create administrator script on vista.

Reference:

  1. MSDN Blog [Ref]
  2. Another way (By VBSCRIPT) [Ref]
  3. Use joeware utility names cpua (Popular in a lot of webboard) [Ref]
  4. Review and tools for administrator (Runas) [Ref]
  5. Microsoft Script Center [Ref]

Posted by Scalopus+

Defined tags for this entry: , , , , ,

Last modified on 2007-12-15 04:47
Oct 8
Technical

Keyword: Command Line, Run as Administrator, cmd, cmd.exe, Privillage mode, "The requested operation requires elevation"

How to run command line (cmd.exe) under Microsoft Windows Vista as Administrator?

sometime when you type a command on Command Line windows, you may got the message "The requested operation requires elevation". That is because the process which you want to start needs Administrator permission, here is the way to start command line as Administrator

Method 1: No Right-click mouse needs

  1. Wins-Key
  2. Type "cmd", it will show cmd.exe in program list DO NOT ENTER
  3. Ctrl+Shift+Enter
  4. You will got UAC that cmd request Administration permission
  5. Continue
  6. Done

Method 2: Right-click mouse needs

  1. Click at Windows Logo
  2. Click All Program > Accessories > and Hold your mouse at "Command Prompt"
  3. Right click and select "Run as Administrator"
  4. You will got UAC that cmd request Administration permission
  5. Continue

  6. Done
source: Petri

Posted by Scalopus+

Defined tags for this entry: , ,

Last modified on 2007-10-13 00:58