Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Linux, BSD, and Unix systems) to Windows.

learn more… | top users | synonyms

14
votes
5answers
7k views

Best way to use a shell with Cygwin in Windows 7

I installed Cygwin, to be disappointed that bash by default runs within "cmd.exe". I googled around and found Console2. It's not a particularly well-designed application, as doing adjustments is ...
14
votes
1answer
833 views

Is cygwin like wine, but for linux applications?

Does cygwin work line wine, providing a compatibility layer inside a foreign os?
12
votes
3answers
6k views

How do I get rid of Cygwin's /cygdrive prefix in all paths?

I'm switching to Cygwin from the bash shell that ships with Git for Windows, and encountering a strange problem. Someone thought it would be a good idea to add /cygdrive/ to all paths, while I think ...
8
votes
4answers
3k views

Cygwin has no watch command?

I installed Cygwin on my Windows XP to use some of its commands. Now I what to check a file every 2 minutes and want to use watch for this purpose but I see that Cygwin has no such command. Is this ...
8
votes
6answers
5k views

Are cygwin vim commands different than normal vim?

I am unable to edit text files using vim in cygwin. I have to press i many times to insert text. Sometimes it works and sometimes doesn't. Whenever I move cursor up down I have to press I many times. ...
7
votes
2answers
7k views

How to alter PATH within bash script?

I have several projects that require me to change versions of Java/Grails/Maven. I'm trying to handle this with some Bash scripts that would make the changes. For example: #!/bin/sh export ...
7
votes
4answers
204 views

Stopping output from a program run in SSH session NOW

Problem I execute command that outputs LOTS of information through SSH. For example, I foolishly add debug information inside a loop that executes million times, or just run cat /dev/urandom for ...
7
votes
2answers
1k views

How can I set up Cygwin to automatically update and download without the GUI?

How can I set up Cygwin to automatically update itself? How can I get Cygwin to download a package without having to go via the GUI thing?
5
votes
3answers
405 views

An equivalent to OS X's “open” in Cygwin?

I know this may be a slightly strange question, plus the fact that I'm asking it here. The reason is that whenever I ask Windows-people about this, or even regular Cygwin-users, they don't seem to ...
5
votes
1answer
946 views

Why is Cygwin not sourcing my .bashrc?

I'm switching to Cygwin from the bash shell that ships with Git for Windows, and for some strange reason the .bashrc file is not being sourced when I open a new Terminal. I have to source .bashrc ...
4
votes
4answers
3k views

find command in cygwin giving parameter format not correct

I am using cygwin in my windows machine. I am trying to do a find and it is giving parameter format not correct. Why is that? $ ls bootstrap.jar catalina-tasks.xml catalina.bat catalina.sh ...
4
votes
1answer
2k views

Why is vim creating files with DOS line endings?

I have set fileformat=unix in my .vimrc, and yet if I create a file in vim (running in Cygwin) it persists in creating DOS files, and I have to run the little cotton-pickers through dos2unix to ...
4
votes
1answer
283 views

How to add a feature to Vim if it's not compiled with that feature?

I am trying to use clewn (full gdb support in the vim editor), but the vim I have on my box doesn't have the netbeans_intg feature enabled. Is it possible to enable it without recompiling vim? I am ...
4
votes
2answers
562 views

A terminal emulator for CygWin?

I have: Windows 7 CygWin A development board connected to COM1 port. I need: Connect to its serial port from CygWin. If I used Linux I would run a program like picocom or minicom. Also in ...
3
votes
2answers
389 views

how to grep for c:\

I'm using cygwin's grep to find all instances of hardcoded paths on c drive. doing: grep -r "c:\\" . gives grep: trailing backslash Does anybody know how I can do this?
3
votes
3answers
172 views

Delete all but largest file of specific type

I am trying to organise the album art in my music collection so that only one image is assigned to each folder. My directory structure currently looks like: /path/to/music/Album Name/ ...
3
votes
1answer
878 views

installing column unix utility on windows

I would like to be able to use the BSD unix utilities: column, join and paste in my Cygwin installation. It seems that they are not available, or I cannot find them. Is there a way to install them so ...
3
votes
1answer
101 views

Read the files in shell script doesn't print out anything?

I am trying to read a file from shell script line by line. Below is my file content - hello=world And below is my shell script that I have written - #!/bin/bash while read -r line; do ...
3
votes
1answer
291 views

Why are these aliases failing?

I am attempting to put some alias definitions in .bashrc. Like this: #Convienience aliases alias ll='ls -l' alias ldir='ls -p | grep "/"' #Temporary aliases alias mvFooLog='mv ~/Projects/Foo/Log.txt ...
3
votes
1answer
2k views

Is dpkg available for Cygwin?

I don't use Windows all that often, but I've found my self in a position where I'm stuck in front of one quite a bit temporarily. So I've been investigating Cygwin. My question is dpkg available for ...
3
votes
2answers
4k views

How to map ALT key in .vimrc?

In order to be able add blank lines without going into insertion mode, I'm trying to map ALT-o and ALT-O to o<ESC> and o<ESC> I've tried the following in my .vimrc map <M-o> ...
3
votes
1answer
132 views

Grep perl syntax and copyright character

I am trying to pull some links out of text that I downloaded of off the internet using grep, but keep getting "Aborted (core dumped)". When using grep I tend to use -P as I prefer to use perl syntax ...
3
votes
1answer
409 views

Git - remove deleted files

I'm using this simple git alias rmdel = "!git rm $(git ls-files -d)" meant "remove deleted", i.e. to remove from the staging area all files deleted from the file system. It works fine except ...
3
votes
1answer
3k views

How do I configure OpenCV and Cygwin to work together?

I'm trying to configure OpenCV-2.2.0-win32-vs2010 with Cygwin to work together. Any ideas on how I can do that?
3
votes
2answers
423 views

Change string occurrences in file while respecting DOS new line sequences

I use Visual Studio for my C# development while using Cygwin for some of the tasks that require scripting. Recently I wanted to change all occurrences of string AAA to BBB in my project's files. I ...
3
votes
1answer
307 views

Xterm is not completely erasing field lines

We are running Windows Clients with Cygwin XServer that has a bash script application running on AIX Unix. We have a login script using expect to ssh into the server and then xterm to create the ...
3
votes
2answers
730 views

How to configure fonts on a remote X connection (XDMCP vs. ssh)?

Connecting to a remote Solaris 10 system over X11 I observe inconsistent behavior regarding the used fonts. I am connecting from a Cygwin/X system. When I connect using ssh forwarding like this $ ...
3
votes
1answer
109 views

Why does insert-mode map “<F4>” unpredictably inserts itself or executes intended key strokes?

In Vim 7.3.1-762, mintty 1.1.2 (xterm), cygwin, Windows XP, the insert-mode map <F4> executes the intended key strokes at one time but inserts itself at another time. This undeterministic ...
3
votes
1answer
236 views

Pausing rsync via bash script?

Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks ...
2
votes
3answers
344 views

Command substitution in for loop not working

I want to keep all files not ending with .bat I tried for f in $(ls | egrep -v .bat); do echo $f; done and for f in $(eval ls | egrep -v .bat); do echo $f; done But both approaches yield the ...
2
votes
3answers
309 views

find first line beginning with <keyword> following <other-keyword>

let's present my problem to explain better. I'm using cygwin, the installation is based on a setup.ini with the following format: @ package-name sdesc: "short description, on one line" ...
2
votes
3answers
4k views

Alternative to `pkill` or `pgrep -f` on cygwin?

Suppose I have starting my process like: java -DSOME_STRING -jar foo.jar Then on linux, I can use the following to find or kill this process: pgrep -f SOME_STRING pkill -f SOME_STRING However ...
2
votes
1answer
179 views

ssh/scp works but rsync just constantly says “no”

Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised ...
2
votes
2answers
116 views

Linux Shell fundamentals: How can I check the file descriptors status, (where are redirected to) right now without lsof?

I am learning about file descriptors for the case of Linux, and I was wondering if there is any command showing a complete list that allows me to know where is each one redirected to in this moment. ...
2
votes
1answer
112 views

groff to PS Conversion

I am very new to UNIX, learning groff with the help of cygwin on Windows XP SP3. I have downloaded groff-binaries from here, but using cygwin, I could not able to re-produce ps files. I have used ...
2
votes
1answer
2k views

I'm not getting syntax coloring in vim (using Cygwin)

I've been so far unable to figure out why vim's syntax coloring is not working for most files, and it's driving me batty. In case this is relevant: I'm working in Cygwin (more ...
2
votes
1answer
1k views

How do I preserve the history file of cygwin bash across independent sessions?

So my home directory does have a .bash_history file, but it refuses to grow any bigger for some reason. I've already changed the .bashrc settings to set the history size to 99999 and the history file ...
2
votes
1answer
247 views

Why doesn't my new cygwin .bashrc interactive check work?

I just updated Cygwin and the new .bashrc contains this line right at the top: echo "BEFORE TEST" # If not running interactively, don't do anything [[ "$-" != *i* ]] && return echo "AFTER ...
2
votes
1answer
86 views

Why is the output of find sorted in Cygwin but not in Solaris?

I wonder why find does not behave in the same way in Solaris as in Cygwin or Linux. I have a bunch of directories that have files called CS##########. Each # is a digits but there are always 10 ...
2
votes
3answers
3k views

How to Cygwin Xwin -query an Ubuntu 11.10 Xserver?

I am running Cygwin 1.7 on Win7 Pro x64, and I can query my Ubuntu 10.04 LTS server just fine. XWin.exe -clipboard -once -rootless -nodecoration -notrayicon -query $IP_ADDRESS I recently installed ...
2
votes
1answer
224 views

why updatedb command takes too much time?

I have read that to run locate command on CYGWIN first I need to run the following command. updatedb --localpaths=c:/ what this command exactly do as I run this on CYGWIN and it is taking too much ...
2
votes
2answers
192 views

Removed `rm` command in cygwin

Having the need to use a bash shell on a Windows computer (I'll spare you the details), I installed Cygwin, and a friend as a joke ran rm /usr/bin/rm on the terminal, and surprisingly nothing much ...
2
votes
2answers
670 views

Cygwin: readline lib loaded in different locations

Within cygwin, almost each unix command I type prints a warning message, takes time and eventually gives a correct result: -bash-4.1$ ls 0 [main] bash 7468 child_info_fork::abort: cygreadline7.dll: ...
2
votes
1answer
72 views

mkdir with date function behaves differently in script

I am trying to create a directory with a timestamp. If I type at the prompt mkdir "$(date +%Y-%m-%d_%H%M%S)" I get a directory named with the date as I would like. If I put the same line in a bash ...
2
votes
1answer
170 views

Is there a way to control the speed at which Curl reports progress?

I'm using Curl in Cygwin to automate a daily download. I want to keep progress in a log but Curl is just a little too noisy for my taste. I tried man curl and Google, but didn't find anything. Can I ...
2
votes
2answers
175 views

is it possible to trigger `ssh-add <key>` only when I ssh into a box? (from Cygwin)

I've got my .bash_profile set up to eval $(ssh-agent) so I can quickly connect to servers. If I add ssh-add ~/.ssh/id_rsa_my_key to my .bash_profile as well, I'll have to type the ssh key passphrase ...
2
votes
0answers
47 views

Corrupt files after extracting with Cygwin's GNU tar

I have a bunch of tarball backups which I just restored onto my new Windows 8.1 + Cygwin system using GNU tar: zsh$ for file in **/*.tgz; do tar xvzf $file; done To my surprise a lot of these ...
2
votes
1answer
307 views

Can't login to remote debian system with RSA key and ssh.exe from Cygwin

I need to login to a Debian server using ssh.exe from Cygwin. I've generated an RSA key and appended it to the authorized_keys file. Debian is OK, because I was able to use the RSA key using PuTTY ...
2
votes
1answer
1k views

Execute bash script using CygWin

How do you execute a bash script using CygWin? I am trying execute a bash script as part of a build.xml. This is the code snippet, <property name="cygwinpath" value="C:/cygwin/bin/"/> ...
1
vote
3answers
1k views

How can we rename a file with semi-colon as part of the filename?

I tried to rename all file with extension "XLS;1" to "XLS" but it just didn't work. I tried the following in cygwin in windows xp and they don't work: mv *.XLS;1 *.XLS mv *.XLS\;1 *.XLS mv ...