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
18 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
175 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
25 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
33 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
28 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
18 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
23 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
15 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
43 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
58 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
38 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
510 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
23 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
127 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 ...
0
votes
4answers
79 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
43 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
2answers
150 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
169 views

Freeglut () failed to open display

I'm new to 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 ...
0
votes
1answer
36 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
82 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
210 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
20 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
44 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
119 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
23 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
67 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
39 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
58 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
233 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
66 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
48 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
68 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
66 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
67 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
237 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
93 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 someone could help me insert a while loop or some other ...
1
vote
1answer
132 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
819 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 ...
0
votes
0answers
137 views

Rsync abilities with multiple destinations simultaenously

A colleague of mine has done great work and is familiar with linux. He is on the verge of solving a problem the vendor couldn't support for viewing medical images. In the vein of learning linux ...
1
vote
1answer
105 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. ...
0
votes
0answers
174 views

In cygwin Python script print with sleep not printing output

I am using cygwin to run a python script which use a while loop and time.sleep() to display an output. If I exclude time.sleep() from inside of loop, cygwin terminal display the output as expected. ...
0
votes
1answer
83 views

math.h was not found at compile time: Hydra (Cygwin)

I`m using Hydra with Cygwin. Can anyone help me with this error? When I using -x option, this error is shown: [ERROR] -x option is not available as math.h was not found at compile time my Cygwin ...
0
votes
0answers
36 views

Call to host's cygwin clipboard from headless virtualbox guest

I'm struggling with getting access to cygwin /dev/clipboard device uder arch linux headless guest via VirtualBox. I tried to mount cygwin root directory as a shared folder in guest, but for some ...
1
vote
2answers
4k views

XOR a file against a key

How is it possible, from bash or standard linux command-line tools, to XOR a file against a key? Something like: cat my1GBfile | xor my1MB.key > my1GBfile.encrypted Off-topic: I know the ...
0
votes
1answer
679 views

Even basic command not working on cygwin [closed]

I just installed cygwin & i am unable to do basic commands in cygwing like :- $ ls -l total 0 $ ls | wc -l 0 $ ls -ld drwxr-xr-x+ 1 Shivendra Gupta None 0 Oct 10 14:40 I have to understand ...
0
votes
1answer
166 views

tmux-resurrect is not restoring my running commands

I'm using the tmux-resurrect plugin to recreate tmux sessions after tmux is shutdown. It mostly works but it is not restoring running commands. I've tried with vim, less, man and tail, all supported, ...
0
votes
2answers
53 views

Returning only the contents before and after a line number with different matching words

I am using cygwin. I have known line# in my hand. Script should look for the first occurrence of the string mono above a specified line number and look for the first occurrence of the string /mono ...
1
vote
2answers
68 views

Why does bash.exe run twice when using --login?

When running cygwin, the shortcut I have uses the following: C:\cygwin\bin\bash.exe --login -i What is unclear to me is why bash.exe executes twice. I see two processes running in task manager. If I ...
6
votes
6answers
9k views

Why am I getting “line 1: $' :\r': command not found”?

I used Cygwin on my laptop (DOS). I have a collection of scripts from my colleagues, and my own. I am not an IT person, not knowledgeable in Unix. I follow my colleagues' syntax and able to manage a ...