Well, it's for people who were dragged from UNIX to Windoze kicking and screaming. It's a way to migrate existing knowledge, skills, and code, rather than having to toss it all and learn a different scripting language, rewrite code from scratch, and so forth.
While not true today, 10+ years ago OS System Administration on Windoze was, well, a joke.
SA [System Administrator]: How do I make XYZ configuration change?
MS: Well, you just fire up our whizbang utility with the graphical interface, click these 5 options in sequence, and presto!
SA: What if I want to do that programatically?
MS: I don't understand what you mean.
SA: I have several hundred (or thousand or tens of thousand) machines to manage. You aren't seriously suggesting that I manually repeat that 5-step process for each one...are you???
MS: Errrr...ummmm...
And thus was born Cygwin: a Win32 port of the "standard" UNIX toolset. Even now, a combination of bash, sed, and awk still beats the pants off of VBScript/Windows Script Host for certain tasks. But Cygwin is probably now most useful for software developers who need to migrate applications from UNIX (or Linux) to Windows. Cygwin allows them to recompile existing code from source, as opposed to having to rewrite it from scratch.
Some people use it to recompile Unix/GNU/Linux code, and some use it because it's a handy package-management system for Unix/GNU/Linux tools. (I used a Cygwin version of Emacs for a while, for example.)
I like it, but it's a little hefty sometimes compared to MinGW. I echo the last comment: what did you want to do with it?
I note with great relish that my post got you here, Charlie. But does that mean I'm going to have to come up with a series of über-geek questions to get you to visit?
As to why, well, I thought I would try out this todotxt thing from Lifehacker. Had no idea it was going to be so complicated.
I couldn't get it to work, so I was just gonna give up, but decided instead to ask about it, and see if it was worth my time to mess with, or if I needed to look for a different way to up my nerd quotient.
Should have been more specific. I got Cygwin installed (on home & work) on XP. I couldn't get the todotxt download to work on it, which was why I initially installed it. The ToDoTxt thing is just a bash script, but for some reason I can't change the mode on it.
Anyway, I have this program installed that I can't really use and honestly know almost nothing about, and before I just turn around and uninstall it, I thought I'd ask around a bit.
Apologies - "I have it running" meant "I have the todo shell script running." So the problem is that you can't chmod the file, as per the instructions on the site? When you `chmod +x todo.sh` you get an error message of some sort?
I'm sure it's user error, I just don't know what the error is.
The site said to type chmod 755 todo.sh. You said the same, only +x in place of 755. Neither one of those things mean anything to me - I'm a born & bred Win guy, I guess.
The error I get is this: chmod: cannot access 'todo.sh': no such file or directory.
- Copy (or move) todo.sh to C:\cygwin\usr\local\bin.
- Launch an XP command prompt, and enter echo %userprofile%. Copy .todo to this directory.
- Open .todo in Wordpad (not Notepad), and edit the line that reads "TODO_DIR="/home/gina/docs/todo" so that it points to an existing directory where you want todo to write its files. The edited line might look like this:
TODO_DIR="C:/Documents and Settings/gummby/My Documents/todo"
Note the use of '/' instead of '\' -- that isn't accidental.
Now, launch cygwin. At the shell prompt ('$'), enter cd /usr/local/bin. Now enter ls. You should see "todo.sh". Now chmod +x todo.sh. Now try adding a reminder:
Click the Start button, then click "Command Prompt". Now type that command I listed. %userprofile% is just a system variable that should translate to something like:
C:\Documents and Settings\gummby
The "gummby" part is no doubt different. I was just guessing there.
So, now you should have the directory location, and you can drag and drop .todo from wherever it is now to there -- no need to use the command line.
Let me know if that makes more sense.
Todo is a neat little utility; thanks for pointing it out.
Was Richard Stallman looking over your shoulder while you were typing? ;-)
Funny. No, but being a Unix sysadmin, there can sometimes be a difference in all those things. (And yes, I think there is something to be said for distinguishing GNU and Linux.)
Gack!!! I'll stick with Vim, thanks. Let the "editor wars" begin! ;-)
Oh, come on. Emacs is a great operating system, it just needs to come with a better editor.
I note with great relish that my post got you here, Charlie. But does that mean I'm going to have to come up with a series of über-geek questions to get you to visit?
Humph. I visit whenever my news reader tells me that you update. I just don't think I'm qualified to chime in unless you cross into this category, and clearly going home for the night yesterday put me so far behind even this time that I might as well give up.
More assumptions on my part. Yes, '#' is the comment char in this case.
At this point, you should be able to just launch cygwin and run todo.sh without changing directories.
I'm guessing that when you said, "this bad boy," you meant cygwin, not the todo script. If so, that's a pretty wide open question. Is that what you're asking?
Funny. No, but being a Unix sysadmin, there can sometimes be a difference in all those things. (And yes, I think there is something to be said for distinguishing GNU and Linux.)
Of course. I'm one too, so I agree. But it was too good to pass up. ;-)
Oh, come on. Emacs is a great operating system, it just needs to come with a better editor.
TGD: Yes, with Cygwin. I'll bang my head through todo.sh, and I'll get back to you after I've messed with it for a bit.
Charlie: Dude, you're just getting here for the good part. You don't have to walk me through actually using it (TDG did all the heavy lifting for you); you can just tell me what it's good for. If I'm not a UNIX admin, can I use it for anything useful?
Your mission, should you decide to accept it, is to make me a UNIX geek.
The thing I use cygwin for is if I happen to be on a windows box that has no ssh client. There may be some other more light-weight yet free (speach and beer) way to get ssh going on a wintel box, but I've never taken the trouble to find out.
20 comments:
Well, it's for people who were dragged from UNIX to Windoze kicking and screaming. It's a way to migrate existing knowledge, skills, and code, rather than having to toss it all and learn a different scripting language, rewrite code from scratch, and so forth.
While not true today, 10+ years ago OS System Administration on Windoze was, well, a joke.
SA [System Administrator]: How do I make XYZ configuration change?
MS: Well, you just fire up our whizbang utility with the graphical interface, click these 5 options in sequence, and presto!
SA: What if I want to do that programatically?
MS: I don't understand what you mean.
SA: I have several hundred (or thousand or tens of thousand) machines to manage. You aren't seriously suggesting that I manually repeat that 5-step process for each one...are you???
MS: Errrr...ummmm...
And thus was born Cygwin: a Win32 port of the "standard" UNIX toolset. Even now, a combination of bash, sed, and awk still beats the pants off of VBScript/Windows Script Host for certain tasks. But Cygwin is probably now most useful for software developers who need to migrate applications from UNIX (or Linux) to Windows. Cygwin allows them to recompile existing code from source, as opposed to having to rewrite it from scratch.
Sorry -- I posted prematurely. Did you install it out of curiosity, or did you have something in particular in mind?
I concur with the above comments, and add:
Some people use it to recompile Unix/GNU/Linux code, and some use it because it's a handy package-management system for Unix/GNU/Linux tools. (I used a Cygwin version of Emacs for a while, for example.)
I like it, but it's a little hefty sometimes compared to MinGW. I echo the last comment: what did you want to do with it?
Some people use it to recompile Unix/GNU/Linux code
Was Richard Stallman looking over your shoulder while you were typing? ;-)
(I used a Cygwin version of Emacs for a while, for example.)
Gack!!! I'll stick with Vim, thanks. Let the "editor wars" begin! ;-)
I like it, but it's a little hefty sometimes compared to MinGW.
I'll agree with that.
I note with great relish that my post got you here, Charlie. But does that mean I'm going to have to come up with a series of über-geek questions to get you to visit?
As to why, well, I thought I would try out this todotxt thing from Lifehacker. Had no idea it was going to be so complicated.
I couldn't get it to work, so I was just gonna give up, but decided instead to ask about it, and see if it was worth my time to mess with, or if I needed to look for a different way to up my nerd quotient.
I have it running on XP, but haven't tried Vista yet. Are you getting a specific error message?
Should have been more specific. I got Cygwin installed (on home & work) on XP. I couldn't get the todotxt download to work on it, which was why I initially installed it. The ToDoTxt thing is just a bash script, but for some reason I can't change the mode on it.
Anyway, I have this program installed that I can't really use and honestly know almost nothing about, and before I just turn around and uninstall it, I thought I'd ask around a bit.
Apologies - "I have it running" meant "I have the todo shell script running." So the problem is that you can't chmod the file, as per the instructions on the site? When you `chmod +x todo.sh` you get an error message of some sort?
I'm sure it's user error, I just don't know what the error is.
The site said to type chmod 755 todo.sh. You said the same, only +x in place of 755. Neither one of those things mean anything to me - I'm a born & bred Win guy, I guess.
The error I get is this:
chmod: cannot access 'todo.sh': no such file or directory.
OK, that makes sense. So, try this:
- Copy (or move) todo.sh to C:\cygwin\usr\local\bin.
- Launch an XP command prompt, and enter echo %userprofile%. Copy .todo to this directory.
- Open .todo in Wordpad (not Notepad), and edit the line that reads "TODO_DIR="/home/gina/docs/todo" so that it points to an existing directory where you want todo to write its files. The edited line might look like this:
TODO_DIR="C:/Documents and Settings/gummby/My Documents/todo"
Note the use of '/' instead of '\' -- that isn't accidental.
Now, launch cygwin. At the shell prompt ('$'), enter cd /usr/local/bin. Now enter ls. You should see "todo.sh". Now chmod +x todo.sh. Now try adding a reminder:
todo.sh add This is my first reminder
...and hold your breath. ;-)
Yeah, maybe I should have just given up.
I don't understand what you mean by:
- Launch an XP command prompt, and enter echo %userprofile%. Copy .todo to this directory.
Do I have to do that from the command line, or can I just drag it with a right click? And where exactly am I copying it to?
[sigh] Assumptions -- not a good thing.
Don't give up!
Click the Start button, then click "Command Prompt". Now type that command I listed. %userprofile% is just a system variable that should translate to something like:
C:\Documents and Settings\gummby
The "gummby" part is no doubt different. I was just guessing there.
So, now you should have the directory location, and you can drag and drop .todo from wherever it is now to there -- no need to use the command line.
Let me know if that makes more sense.
Todo is a neat little utility; thanks for pointing it out.
Still getting the same error. Would it have anything to do with the fact that my WIN signon is first and last name, separated by a space?
Whoops. I think I got the command mode changed. But now I'm getting a different error.
Fatal Error: ~todo is not a directory.
I think I figured out what the problem was. I was editing the wrong line. I finally figured out that the lines with the # were comment lines.
Thanks for all your help.
Now my next question(s) are:
Do I have to change the directory every time before I can do anything?
What else can I do with this bad boy?
Was Richard Stallman looking over your shoulder while you were typing? ;-)
Funny. No, but being a Unix sysadmin, there can sometimes be a difference in all those things. (And yes, I think there is something to be said for distinguishing GNU and Linux.)
Gack!!! I'll stick with Vim, thanks. Let the "editor wars" begin! ;-)
Oh, come on. Emacs is a great operating system, it just needs to come with a better editor.
I note with great relish that my post got you here, Charlie. But does that mean I'm going to have to come up with a series of über-geek questions to get you to visit?
Humph. I visit whenever my news reader tells me that you update. I just don't think I'm qualified to chime in unless you cross into this category, and clearly going home for the night yesterday put me so far behind even this time that I might as well give up.
Doh! [forehead slap]
More assumptions on my part. Yes, '#' is the comment char in this case.
At this point, you should be able to just launch cygwin and run todo.sh without changing directories.
I'm guessing that when you said, "this bad boy," you meant cygwin, not the todo script. If so, that's a pretty wide open question. Is that what you're asking?
Funny. No, but being a Unix sysadmin, there can sometimes be a difference in all those things. (And yes, I think there is something to be said for distinguishing GNU and Linux.)
Of course. I'm one too, so I agree. But it was too good to pass up. ;-)
Oh, come on. Emacs is a great operating system, it just needs to come with a better editor.
Touché.
Cheers!
TGD: Yes, with Cygwin. I'll bang my head through todo.sh, and I'll get back to you after I've messed with it for a bit.
Charlie: Dude, you're just getting here for the good part. You don't have to walk me through actually using it (TDG did all the heavy lifting for you); you can just tell me what it's good for. If I'm not a UNIX admin, can I use it for anything useful?
Your mission, should you decide to accept it, is to make me a UNIX geek.
The thing I use cygwin for is if I happen to be on a windows box that has no ssh client. There may be some other more light-weight yet free (speach and beer) way to get ssh going on a wintel box, but I've never taken the trouble to find out.
Post a Comment