Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Running the server
➜ Couple of Cygwin problems
Couple of Cygwin problems
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Tseris
(98 posts) Bio
|
Date
| Tue 01 Sep 2009 11:30 AM (UTC) |
Message
| 1. I was wondering how to change my home directory when Cygwin starts up, it gets really annoying to have to punch in
cd /cygdrive/c/Documents\ and\ Settings/User/Desktop/smaug/smaugfuss
every time I go to use it. It would be nice for it to just start out in that directory, because I dont use cygwin for anything else.
2. I followed the instructions for downloading Cygwin and got all the same packages recommended on this site, but I somehow dont have grep. Using the grep command doesnt return anything, "help grep" says no topics match, and "man -k grep" says theres nothing appropriate.
Im sure these are probably simple fixes, but I just havent been able to figure out how. Any help would be greatly appreciated. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Tue 01 Sep 2009 09:14 PM (UTC) |
Message
|
Tseris said:
1. I was wondering how to change my home directory when Cygwin starts up, it gets really annoying to have to punch in
cd /cygdrive/c/Documents\ and\ Settings/User/Desktop/smaug/smaugfuss
every time I go to use it. It would be nice for it to just start out in that directory, because I dont use cygwin for anything else.
Make a soft link. eg.
ln -s /cygdrive/c/Documents\ and\ Settings/User/Desktop/smaug/smaugfuss smaug
Now if you do "ls -l smaug" you should see something like:
lrwxrwxrwx 1 Owner None 63 Sep 2 07:09 smaug -> /cygdrive/c/Documents and Settings/User/Desktop/smaug/smaugfuss
See the "->" after smaug? That means smaug "points to" the other directory. Having done that, in your home directory, after starting up Cygwin, you now just have to type:
Tseris said:
2. I followed the instructions for downloading Cygwin and got all the same packages recommended on this site, but I somehow dont have grep. Using the grep command doesnt return anything, "help grep" says no topics match, and "man -k grep" says theres nothing appropriate.
Im sure these are probably simple fixes, but I just havent been able to figure out how. Any help would be greatly appreciated.
I get that too, but that is only the manual for grep, not grep itself. For example, typing grep on its own:
$ grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
When you say "Using the grep command doesnt return anything" do you mean you get an error message like:
$ grep
bash: grep: command not found
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Tseris
(98 posts) Bio
|
Date
| Reply #2 on Tue 01 Sep 2009 10:42 PM (UTC) |
Message
| Thanks on the soft link.
On the grep issue if i type grep by itself i get the same thing you displayed.
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
but if I try 'grep mistwalk' for example, the cursor returns to the next line but does not display any text at all. And from that point on the terminal doesnt respond to any commands I type. I have to close down cygwin and start over. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #3 on Tue 01 Sep 2009 11:03 PM (UTC) |
Message
| That is because it is searching standard input for mistwalk (that is, what you are typing). That is why it seems to not respond.
You could always hit Ctrl+C to exit if you do that by mistake.
You need to specify file names, like this:
That searches all the .c files for the word "mistwalk".
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Tseris
(98 posts) Bio
|
Date
| Reply #4 on Tue 01 Sep 2009 11:08 PM (UTC) |
Message
| |
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
16,575 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top