command-line

Linux shell equivalent on IIS

As a LAMP developer considering moving to a .Net IIS platform, one of my concerns is the loss of productivity due to lack of shell... Has anyone else had this experience? Is there possibly a Linux shell equivalent for Windows? ...

How do you use PowerShell?

Windows PowerShell came out last year and got great reviews from many .net bloggers (Hanselman comes to mind). It seemed to be touted as a great new utility that somehow made everything that you would ever do on the command line easier, and integrated with .Net. However, the more I read about it, the more it seems to be a tool that is gr...

better command for Windows?

While I grew up using Windows, I transitioned to my much-loved Mac years ago. I don't want to start a flame war here on operating systems. I do, however, want a terminal a little closer to what I'm used to. I'm not asking for full POSIX support - I don't have the patience to install CygWing - but I miss tabbed terminals, being able to...

Can I copy files to a Network Place from a script or the command line?

Is it possible, in Windows XP, to copy files to a Network Place from the command line, a batch file or, even better, a PowerShell script? What sent me down this road of research was trying to publish files to a WSS 3.0 document library from a user's machine. I can't map a drive to the library in question because the WSS site is only ava...

Send messages to program through command line

I have this program, we'll call it Host. Host does all kinds of good stuff, but it needs to be able to accept input through the command line while it's running. This means it has to somehow send its other process data and then quit. For example, I need to be able to do this: ./Host --blahblah 3 6 3 5 This should somehow end up calling...

How can I stop MATLAB from returning until after a command-line script completes?

I see in the MATLAB help (matlab -h) that I can use the -r flag to specify an m-file to run. I notice when I do this, MATLAB seems to start the script, but immediately return. The script processes fine, but the main app has already returned. Is there any way to get MATLAB to only return once the command is finished? If you're calling it...

'lsof' equivalent for windows

One of my favourite tools for linux is lsof - a real swiss army knife! Today I found myself wondering which programs on a WinXP system had a specific file open. Is there any equivalent utility to lsof? Additionally, the file in question was over a network share so I'm not sure if that complicates matters. ...

How do I send a file as an email attachment using Linux command line?

I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file. The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping. I've been able to send the raw s...

What's the best way to distribute python command-line tools?

This is my current setup.py script. It works okay, but it installs tvnamer.py (the tool) as "tvnamer.py" into site-packages or somewhere similar.. Can I make setup.py install tvnamer.py as tvnamer, and/or is there a better way of installing command-line applications? ...

What do you think of developing for the command line first?

What are your opinions on developing for the command line first, then adding a GUI on after the fact by simply calling the command line methods? eg. W:\ todo AddTask "meeting with John, re: login peer review" "John's office" "2008-08-22" "14:00" loads todo.exe and calls a function called AddTask that does some validation and throws...

CMD.exe replacement

Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that does not really meet my needs at work because it's too heavy. I'd like a function-for-function identical wrapper on cmd.exe, but with highlighting, intellisense, and (critically) a tabbed interface. Powershell is okay, but the interface is still la...

What's the best way to grab/parse command line arguments passed to a Python script?

The title says it all...what's the easiest, tersest, and most flexible method or library for parsing Python command line arguments? ...

How to Pass Command Line Parameters in batch file

I needed to pass id and password to a cmd (or bat) file at the time of running rather than hardcoding them into the file. Here's how I do it. echo off fake-command /u %1 /p %2 Here's what the command line looks like: test.cmd admin P@55w0rd > test-log.txt The %1 applies to the first parameter the %2 (and here's the tricky part) ap...

Set up PowerShell Script for Automatic Execution

I have a few lines of PowerShell code that I would like to use as an automated script. The way I would like it to be able to work is to be able to call it using one of the following options: One command line that opens PowerShell, executes script and closes PowerShell (this would be used for a global build-routine) A file that I can do...

Tool for commandline "bookmarks" on windows?

Hi, Im searching a tool which allows me to specify some folders as "bookmarks" and than access them on the commandline (on Windows XP) via a keyword. Something like: C:\> go home D:\profiles\user\home\> go svn-project1 D:\projects\project1\svn\branch\src\> I'm currently using a bunch of batch files, but editing them by hand is a daun...

Tracking down where disk space has gone on Linux?

When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time before any results are returned. Also, this is usually successful in highlighting the worst offender but I've often found myself resorti...

What is the best and most complete implementation of Unix system commands?

I've found a few (unfortunately, they are bookmarked at home and I'm at work, so no links), but I was wondering if anyone had any opinions about any of them (love it, hate it, whatever) so I could make a good decision. I think I'm going to use Cygwin for my Unix commands on Windows, but I'm not sure how well that's going to work, so I wo...

Subversion: Fail update when there are conflicts?

Is there a way to tell subversion "update/merge unless it would cause a conflict"? I know you can use --dry-run / status -u to check before running the update, but I often have others running updates and getting broken webpages because they don't notice the "C index.php" line. I've also noticed that svn doesn't seem too unhappy about...

VS2008: Copy Web Site from command line

How do I execute the "Copy Web Site" command for an ASP.NET project in VS2008 from the command line? If I need to script this, let me have some pointers on where I can learn that. ...

VS2008/TFS: Get Latest of solution from command line or macro

How do I get the latest version of my solution recursively like its done in the solution explorer context menu of Visual Studio? Need to do this from the command line or via a macro. /* 'tf get' only gets contents of a folder recursively (not solution). It does not look at project dependencies and so on. That won't work. */ I'm trying ...