Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cygwin]

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

0
votes
0answers
37 views

Cygwin FIFO vs native Linux FIFO - discrepancy in blocking behaviour? [migrated]

The code shown is based on an example using named pipes from some tutorial site server.c #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #...
7
votes
1answer
272 views

Shells with the ability to treat `\r` as a whitespace character

As a personal project, I'm trying to write a script to clean up some of the extraneous files that ship with Windows 10 that runs under Cygwin. I'd like the script to be copy and paste-able, which ...
-1
votes
0answers
81 views

rsync: read error: Connection reset by peer (104)

I was running rsync just fine between 2 windows machine with cygwin. I am moving files from old Windows 2008 server to NFS share storage through 2016 Windows server. Don't ask why, that's the way it ...
1
vote
1answer
71 views

Rsync - write permission denied

I use rsync on Windows (Cygwin), where I move files from shared folder (from another Windows instance) to NFS storage. I have mapped the shared folder to one drive and mounted the NFS folder to ...
-1
votes
2answers
24 views

How to select a line in Cygwin

I am unable to select a line in cygwin, atleast by using the traditional windows method of clicking and dragging the mouse curser across the line that i would like to select. Is there a specific ...
0
votes
0answers
37 views

Problem with using gawk multi-dimension array in cygwin

Background: I'm trying to create a program that reads multiple files and creates a hist from the data in all of them. The data has 3 features, so I am building up a multi-dimensional array. the code ...
0
votes
1answer
50 views

Tmux binding error `returned 127` in cygwin

I want to use a clipboard manager in tmux. It is the CopyQ, but it does not matter, I guess. In ~/.tmux.conf I set following binding: set-window-option -g mode-keys vi bind C-y run 'out=`tmux save-...
0
votes
2answers
277 views

Where is Cygwin set its PATH variable?

If I write echo $PATH in my Cygwin window (mintty) I get a list of paths. That list does not match the Windows Envirnonement variables list. I cannot find a file, where is the variable $PATH set. None ...
1
vote
0answers
34 views

wget behaves differently on cygwin and centos

On cygwin this command works as expected and exits immediately: wget --post-file oryxblock.2018-10-10_20_40-07_591.204.txt --output-document - --header "Content-Type: text/csv" http://htm-psycho-402....
0
votes
2answers
72 views

setfacl -R doesn't work on Cygwin

I want to change the ACL and the default ACL for all directories and files in a base directory. In other answers (such as this one), the -R flag is used. However, I get $ setfacl -R -m u::rwx my_dir/ ...
0
votes
0answers
79 views

ls ~ permission denied with xonsh in Cygwin

I tried to use xonsh in my Cygwin terminal, but ran into some problems with permissions: loom@tatooine ~ $ ls xonsh: subprocess mode: permission denied: ls However, I can use the command ls as ...
5
votes
1answer
202 views

Can't chown 0 (root) in Cygwin

This command: rm -f testfile && touch testfile && chown 0 testfile is failing in Cygwin with error: chown: changing ownership of 'testfile': Invalid argument Why?
0
votes
1answer
28 views

gawk process multiple files inside directory

I have multiple text files in a folder that I want to process through gawk, rather than process them each individually is it possible I can process them all at once without merging them into 1 .txt ...
0
votes
1answer
21 views

(BASH) String to execute is formed correctly, but evaluated with errors

I have been persistently trying to solve an issue with some code that I'd like to use to interact with AWS CLI. After trying for about a week, I decided to try to create the string of the command I'd ...
-1
votes
1answer
367 views

Copy file from Windows to Linux WHEN A SHELL SCRIPT IS EXECUTED

I have a program on Linux server, which runs a shell script on Linux server. Say "/tmp/ShellScript.sh" Now I want to copy a file placed on my Windows Machine location "C:\WindowsFolder\FileToCopy" to ...
1
vote
1answer
40 views

Gawk partial match

My gawk script isn't matching all potential results, it's only matching one of them.. Example - script: gawk -F: "FNR==NR{a[$2]=$1;next} $1 in a{print a[$1] FS $2}" username.email.txt email.phone....
0
votes
1answer
60 views

How to ssh into CentOS instance on Openstack with pregenerated PEM private key using Cygwin

I am missing something simple here. Can someone help determine why I can't ssh into this remote CentOS instance on Openstack using the pre-generated private key. I created a public/private key in ...
1
vote
1answer
41 views

Emacs silently fails to start under Cygwin

I installed emacs 26 under cygwin64, terminal version, no X. When I enter emacs to start there is a second or so delay before the bash prompt reurns, the error code is set to 0. The same thing ...
0
votes
1answer
20 views

Slice between two strings (email + word) [closed]

I need a way to slice everything after an email appears and before certain text appears. Example formats are shown here: email@email.com:0:3rw3e:weofkew:StackOverflow= email@email.com:19.2132.1:...
0
votes
2answers
49 views

Bash Split into files by line

I have a huge .txt file with multiple lines, but there's a particular string on a line that separates a number of lines from one another I want to use that string to split into numerous files named ...
1
vote
1answer
473 views

cygwin putty Startup Error: Unable to detect graphics environment

When I start cygwin/X X Server (1.17.1-2) and then putty with x11 forwarding enabled (X display location set to localhost:10.0 and MIT-Magic-Cookie-1 ticked) I still get the error Startup Error: ...
0
votes
1answer
48 views

Sort .csv file alphabetically doesn't work correctly when there is a hyphen [duplicate]

I want to sort a .csv file which contains different names. But there is a problem when a name has a hyphen at the beginning. I tried things like: sort -k1 -t sort -k1 -g -t sort -k1 -n -t input: ...
7
votes
3answers
523 views

Why am I required to use an IP address when Waking-on-LAN a computer?

I have a new GNU/Linux Debian 9 server installation. This is what I get from ethtool: root@web-server:~# ethtool enp2s0 Settings for enp2s0: Supported ports: [ TP MII ] Supported ...
0
votes
0answers
27 views

Creating Local tmux Window

Is it possible to create local window on remote running tmuxinator session? There is my current tmuxinator config project file: project_name: RP project_root: ~/ windows: - LOCAL: # This window ...
2
votes
1answer
236 views

How to find files with a specific pattern in the parent and child directory?

How to find files with a specific pattern in the parent and child directory of my present working directory using a single command ? Filename - test.txt, the file has the pattern nslookup This file ...
1
vote
4answers
277 views

Treat “\r” as nothing in “while read -r”

I have this line of code that reads a text file line by line. The text file is sometimes generated by a Windows user, sometimes by a Unix user. Therefore, sometimes I see \r\n at the end of the line ...
1
vote
3answers
50 views

Printing columns using AWK?

I have roughly 7 columns on each line, I want to print two specific columns then the remaining columns after the last specified one, example: awk -F: {' print $2 ":" $6 '} a.txt would print columns ...
3
votes
1answer
480 views

ping command always returns zero exit code in cygwin

I just noticed the ping command always returns zero exit code in cygwin. I installed it as a package ping. Actual output: $ ping 192.168.0.102 -c 1 PING 192.168.0.102 (192.168.0.102): 0 data bytes ...
0
votes
0answers
461 views

Freeglut () failed to open display

I'm coding, running a software called Madagascar within Cygwin. I have made a SConscript file and then run the command scons, which works. But when I run the command scons view, which is supposed to ...
0
votes
1answer
56 views

bspwm on cygwin - slow redraw isssue

I have managed to compile bspwm tiling window manager under cygwin 2.10.0(0.325/5/3) (Windows 7), compared to Openbox, LXDE or fwvm the performance is quite bad. Can you please suggest me some ideas ...
0
votes
2answers
188 views

How to make my Makefile compatible with Cygwin? (install: invalid user ‘root’)

I have written a very simple Makefile $ cat Makefile install_path=/usr/local/bin script_name_1=encrypt-file-aes256 script_name_2=decrypt-file-aes256 .PHONY: install .PHONY: uninstall install: ...
1
vote
1answer
632 views

Which cygwin package contains ip command?

I need the ip command in cygwin. I discovered that it's part of the iproutes2 package. But cygwin doesn't have that package?? I what cygwin package can I find ip command? (I need to find the gateway,...
0
votes
0answers
22 views

Is it possible to link the device and other things (like null, random and urandom) in the subdirectory /dev in MSYS2?

Q1: Is there any program or command which initialize all the accessible device to %MSYS_Root%\dev? Q2: If the answer to Q1 is positive, can I access them in bash.exe without Administrator prior? Q3: ...
0
votes
1answer
118 views

LFTP adds “;type=i” to remote file name

I'm using LFTP version 4.7.8 under cygwin. It automatically adds ";type=i" (or ";type=a" if I do put -a) to remote file name. What's more, mv command does not work : mv: Operation not supported: 501 ...
1
vote
1answer
230 views

compiling i3 under cygwin - cannot find libiconv library

I am trying to compile i3 version 4.14.1 under Cygwin 2.884 (Windows 7). I have installed needed libiconv library via Cygwin setup but while running ./configure I get this error: configure: error: in ...
0
votes
0answers
26 views

Enabling vim undo history in Cygwin

I have an install of Cygwin on a Windows 10 machine. I am trying to enable undo history in vim so that it is remembered between vim instances. At the moment everything is forgotten after closing the ...
2
votes
1answer
75 views

Why `env` does not find my executable?

I'm trying to use shebang with /usr/bin/env form to execute my script under custom interpret. This is how my file looks: $ cat test.rb #!/usr/bin/env winruby print "Input someting: " puts "Got: #{...
0
votes
0answers
55 views

Cygwin find not ignoring glob characters

I am attempting to find files that match a list of files I have already generated. The script I have is: IFS=$'\n' # make newlines the only separator set -f # disable globbing set -...
0
votes
1answer
80 views

Exact String match works for grep 2.6.3 but not for grep 3.0

I am facing an issue on my windows machine with Cygwin in it. On one of my machine grep exact string match using $ works: $ ipconfig /all | grep -A 1 'My Ethernet Server Adapter B52-2$' ...
0
votes
1answer
409 views

Replacing getopts.pl with Getopt::Std [closed]

I am using Cygwin version 2.10.0 with perl 5.26.0. I need to change getopts.pl to Getopt::Std but what to do with &Getopts('F:f:'); line then? #! /usr/bin/perl require "getopts.pl" ; # Perl ...
0
votes
4answers
144 views

sed remove digits from end of stirng

remove digits from end of string, example input: example123 example321 example0123 expected output: example example example I tried the below which didn't work: sed 's/[0-9]\+$//' <in.txt >...
-2
votes
1answer
52 views

viewing actual file size of folder

I know that the command du -csbh will show you the actual file size of a directory. This will be displayed as: 241 MB which is fine. If I look in windows 10 at the properties of the same folder. The ...
0
votes
2answers
154 views

How do I avoid make to generate and install man pages?

Context: I'm compiling OpenLDAP on Windows inside CygWin. As I'm not interested in man pages (and possibly other documentation, I'm focused on getting the compilation done), since I can get them ...
1
vote
1answer
69 views

Escaping single quote [closed]

I had to wipe my drive and reinstall windows, which also required reinstalling cygwin. In my new install, ls -l "*\'*" returns ls: cannot access '*\'\''*': No such file or directory For years up ...
0
votes
2answers
90 views

Can't install to Cygwin's MinGW sysroot (it's protected)

I have built a library with this command: $ ../configure '--host=x86_64-w64-mingw32' --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw && make && make install Installation fails ...
0
votes
1answer
306 views

Cygwin: installing Seismic Unix - error during make install

I am trying to install the software "Seismic Unix" for Cygwin on Windows. Under normal circumstances the issue described below would probably be fixed with downloading Cygwin again and doing just a ...
0
votes
2answers
121 views

Have bash script running every min in Cygwin

I have the following script and I need this to run every minute on my windows server. The file path is d/TFTP/script.sh so I was wondering if I can insert a while loop or some other method so I can ...
1
vote
1answer
222 views

Git functions requiring SSH broken on Cygwin

On Cygwin, running git clone git@..., git pull or git push, where the remote is an SSH repository address, fails. Below is output of running git clone: Cloning into 'iko-app-rocket'... fatal: cannot ...
4
votes
4answers
1k views

Grep keep (output) entire .txt file if one line contains string

I know that grep -rhI "# Active" > out.txt will output any line containing # Active within the searched directory but I want the entire .txt file contents, so example example.txt Line1 Line2 ...
1
vote
1answer
121 views

How to pass pseudo-file to child program?

I am using Cygwin - no, don't close yet - and I am having trouble with the <() syntax. A program refuses to accept the file descriptor that I am passing it, but other programs will accept it fine. ...