Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
56 views

Cygwin bash script file fails silently

I have a script file that uses rsync for backup, then compares the two directory trees using diff. diff seems to find all the differences correctly - it matches what WinMerge finds. But when there ...
Ronzone's user avatar
  • 21
0 votes
0 answers
158 views

cygwin terminal adds carriage return to bash prompt [duplicate]

Running Windows 10. Just installed Cygwin, running it in Windows Terminal, tried to change the prompt format by editing PS1 variable and exporting in .bashrc and .bash_profile: alias vim='nvim' alias ...
chenel's user avatar
  • 1
0 votes
0 answers
84 views

cygwin64's pgrep not working

I installed Cygwin64 and tried its pgrep.exe tool (with admin privilege) as follows: PS D:\cygwin64\bin> D:\cygwin64\bin\pgrep.exe svchost.exe PS D:\cygwin64\bin> D:\cygwin64\bin\pgrep.exe ...
D.J. Elkind's user avatar
0 votes
0 answers
1k views

SSL connect error (schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE

I try to install spotdl using cygwin git clone https://github.com/spotDL/spotify-downloader && cd spotify-downloader curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh pip install ...
Super Sonic's user avatar
-2 votes
2 answers
425 views

$PATH corruption on Cygwin on Windows 10

I am running cygwin on a Windows 10 computer. If I execute $PATH from the cygwin command window, I get the following error: $ $PATH -bash: /usr/local/bin:/usr/bin:/cygdrive/c/Program: No such file or ...
Ben Blackwell's user avatar
2 votes
1 answer
153 views

How to access DNG file creation date from Windows Explorer

I would like to access the creation date of a DNG file, SomeImage.DNG. In Windows Explorer, under View > Details, the "Date" column lists the correct creation date, which I happen to know....
KAE's user avatar
  • 1,889
1 vote
1 answer
340 views

Start cygwin bash.exe without inheriting windows home

I want to be able to run in the cygwin environment from CMD but when I run C:\cygwin64\bin\bash.exe -l -i my home gets set to the windows home. As I understand bash.exe inherits the environment from ...
Pangi's user avatar
  • 15
1 vote
2 answers
488 views

Cygwin find returns "missing argument to `-exec'"

I have backups script that removes backups older than x days. On Linux machine this is working well: find /backups/dummy-prod-db -name "*_D_dummy-prod-db*" -type f -mtime +7 -exec rm -v {} \;...
Kamil's user avatar
  • 2,666
0 votes
1 answer
442 views

Move and rename files based on their parent folders

I'm trying to write a Bash function that will find files in a given directory tree and move them to the current folder while renaming them based on their parent folder, but I'm still stuck on the ...
Hashim Aziz's user avatar
4 votes
2 answers
2k views

Windows: How to make cygwin bash.exe to take precedence over wsl in command line?

I have installed cygwin on Windows 11. Now, when I open the Windows command line, I want the bash.exe command to run the cygwin's bash command instead of bash linked with wsl (Windows subsystem for ...
Adam's user avatar
  • 151
0 votes
1 answer
265 views

can't run commands in bash invoked from emacs shell on windows

I invoked "shell" which correctly runs cmd.exe and runs correctly. However, when I run bash from within that shell, every command gives an error Microsoft Windows [Version 10.0.22000.739] (c)...
anjanbacchu's user avatar
  • 1,407
1 vote
0 answers
833 views

bash: patch.exe: Permission denied; how to turn off security regarding 'patch' in program name in windows 10?

I stumbled upon a problem patching a .diff file using patch. I use bash under windows 10 and the result of of this operation is as follows: $ patch < patch.diff bash: /cygdrive/c/cygwin/bin/patch: ...
tansy's user avatar
  • 176
0 votes
1 answer
200 views

Accessing notepad++ from cygwin bash

So when I am writing code, I use notepad++ and when I am done, I copy-paste it to plain old notepad because I use Cygwin and notepad is the only text editor that I know how to access from the shell. ...
Ahmad Alkhaled's user avatar
1 vote
3 answers
342 views

What does the "cyg" prefix mean?

I've seen so many cyg prefixed things like cygstart, cygpath, cygwin etc., but what exactly does this prefix mean?
Wenfang Du's user avatar
3 votes
1 answer
193 views

Can I add a newline into a command from bash's history?

I often stumble across this problem: I type a command that has multiple lines for readability. This is an example: echo "Hello. This is an example of a very long command which is divided into ...
Bowi's user avatar
  • 1,527
0 votes
2 answers
90 views

Can I let `rm` prompt again if I type the wrong key?

Question Is there any way to let rm -i just ask again if I type in anything different than j/J/n/N at its prompt? Reason Consider this small example: echo "Hey, I am a file. Or at least I am IN ...
Bowi's user avatar
  • 1,527
0 votes
0 answers
197 views

Cygwin bash prompt is removing unexpected characters with multiline command [duplicate]

I repaired line wrapping in my cygwin using of the solution in Cygwin bash prompt is wrapping lines on the same line. However, I encountered another problem. When a long command is posted, it's split ...
ashrasmun's user avatar
  • 101
2 votes
1 answer
407 views

Cygwin / mintty window size and GNU bash readline do not get along?

I have a problem with the Cygwin / mintty window size and the standard GNU bash readline shell. When I have 80 columns or less it works normally. But when I make the window wider then the bash (...
Gunther Schadow's user avatar
1 vote
1 answer
465 views

GNU Parallel is behaving differently on SIGTERM in two cygwin installations

Consider this small bash function: saySomethingToSomebody() { sleep 1 echo "$1 $2." sleep 2 } When I call saySomethingToSomebody Hello Adam, it says Hello Adam. and waits a bit ...
Bowi's user avatar
  • 1,527
0 votes
0 answers
290 views

How to setup Cygwin in Sublime Text in terminus?

I saw a post about how to set up Cygwin in Sublime Text in this link, but it's still not working in my case. [ { "keys": ["alt+o"], "command": "...
RajinCoding2007's user avatar
0 votes
2 answers
2k views

Using variables with bc: syntax error

The original problem This may be more of a bc or bash question than an FFmpeg one, although I would also appreciate being able to prevent ffprobe from printing carriage returns after its output. In a ...
Hashim Aziz's user avatar
0 votes
1 answer
575 views

Changing default startup directory in CygWin and using alias

Following this post : How do I change the default startup directory in Cygwin? I was able to change the default directory by editing the .bashrc file. I was curious about the alias : I created the ...
m3.b's user avatar
  • 103
0 votes
0 answers
105 views

Remove duplicate lines from lots of files recursively

I have a directory tree of a few thousand folders consisting of an ungodly amount of total lines - about 2 or 3 times my system's memory. I could have run uniq or sort -u inside of a for loop but I ...
Hashim Aziz's user avatar
0 votes
0 answers
66 views

Compiling bash loadables on cygwin

I download bash (5.1) source from : https://ftp.gnu.org/gnu/bash/ # Both in cygwin and wsl1 ./configure && make ran successfully. When I tried to install with # Ran fine on wsl1 make install ...
Philippe's user avatar
  • 131
1 vote
1 answer
75 views

For loop logic to skip processing files

I wrote the following script in an attempt to try my hand at automation, to automate some common transformations on sets of text files I work with: #!/bin/bash set -e if [ $# -eq 0 ]; then echo "...
Hashim Aziz's user avatar
0 votes
2 answers
638 views

Is LC_ALL=C destructive?

I have a reasonably large (~15GB) set of text files. These files are essentially simple databases that contain credentials, and the credentials in them often fall outside of the 128-character ASCII ...
Hashim Aziz's user avatar
9 votes
2 answers
12k views

purely command-line operation of dropbox

Is it possible to make use of dropbox account from purely command-line solution e.g a bash script? I have so far failed to find a comprehensive answer to this question. I have used Git for sometime ...
gyuunyuu's user avatar
  • 233
0 votes
0 answers
305 views

Debugging slow cygwin bash startup

Running: strace bash -li and grepping for CreateProcessW: 182 590565 [main] bash 512 frok::parent: CreateProcessW (C:\cygwin64\bin\bash.exe, C:\cygwin64\bin\bash.exe, 0, 0, 1, 0x420, 0, 0, ...
levant pied's user avatar
1 vote
1 answer
11k views

How to test ssh port forwarding using netcat (nc)?

I'm attempting to debug an issue with port forwarding, which is "Why can I not limit which port to connect to?" This isn't the question here though. This question here is "Why won't nc send any data ...
Adrian's user avatar
  • 612
0 votes
0 answers
1k views

Cannot remove files in Cygwin on Windows 10

I just installed Cygwin on a new Windows 10 machine. I get an error "Invalid request code" whenever I try to remove a file. However every other file operation that I have tested so far seems to work ...
Sean Baker's user avatar
1 vote
1 answer
51 views

How to run five commands in one sh file?

I'm working in Cygwin terminal when i choose in cygwin terminal ./test2.sh it split my files and in second step should execute the remaining commands but it stops bellow content of my test2.sh ...
Tom's user avatar
  • 29
0 votes
1 answer
303 views

how to install gengetopt on cygwin

I have some C code originally developed on linux, which makes use of gengetopts to parse the command line. I also want to build that code on cygwin. (On linux I simply did "apt-get install gengetopt" ...
danmcb's user avatar
  • 133
1 vote
0 answers
67 views

Cygwin: Is it safe to pipe from /dev/clipboard to clip?

I am using cygwin on windows. Given a long list of strings in the clipboard: mail know trial posture wind census shelf concrete moon fee If I want to "unwrap" them, is it safe to use such a command:...
Bowi's user avatar
  • 1,527
1 vote
2 answers
2k views

Bash auto completion not working after certain command

I am using graphViz under bash / Cygwin, but somehow when calling it, bash tab autocomplete does not do anything. Example files: myGraph.graphviz is the input file myGraph.graphviz.png should be the ...
Bowi's user avatar
  • 1,527
0 votes
1 answer
157 views

Escape Character for % in Bash prompt

I have a bat file Sig.Bat containing : rdiff.exe -b 10240 signature 'D:/test/NZ 100% Pure/ABC.txt' 'D:/test/NZ 100% Pure/ABC.txt.DSS' I excute Sig.Bat with command bash -l -c '"D:/test/Sig.bat"' ...
user1018822's user avatar
0 votes
1 answer
165 views

Basic bash if statement with hg fails

I'm running Cygwin. I came across the following snippet of Bash code from the FFmpeg Wiki's guide to compiling FFmpeg: cd /ffmpeg_sources && if cd x265 2> /dev/null; then hg pull &&...
Hashim Aziz's user avatar
1 vote
0 answers
60 views

Why is this for loop removing the first one or two characters of a file path?

I am trying to find all *.flac files in a directory tree, encode them with ffmpeg, and then output them to a corresponding tree in another location. I am using Cygwin on Windows 10. This is what I ...
Drew's user avatar
  • 39
0 votes
1 answer
5k views

System Variables (PYTHONPATH) on CYGWIN

I am going through some programing related tutorials that require usage of use bash on Windows. I installed CYGWIN, but it seems linux uses a environmental variable called PYTHONPATH, which the ...
moondra's user avatar
  • 593
0 votes
0 answers
49 views

Creating a Windows application that has to call bash scripts and Python scripts that use Linux-based modules?

I want to create a Windows application that calls bash scripts and Python scripts that use Linux-based modules. I'm pretty new to this, so I'm sorry if this is a dumb question. What would be the ...
trialUser's user avatar
1 vote
0 answers
2k views

How to change permissions under Mingw or Cygwin?

My ~/.ssh/id_rsa is 644 when it should be, I believe, 600. The host is Windows 10 and I have both git-bash 2.17.0 and MobaXterm 10.5-3582. If I try to change group, git-bash will fail with $ chown :...
vesperto's user avatar
  • 184
1 vote
1 answer
236 views

Searching for square bracket with zipgrep

I have tried this in Cygwin and git-bash - same result. With plain grep, a [ character in the pattern can be escaped with a backslash to indicate a literal [ character is to be searched for. But ...
Robin Green's user avatar
  • 1,305
0 votes
2 answers
61 views

cmd.exe launched from another cmd.exe

I'm doing a script that I start with bash.exe from Cygwin on Windows: C:\bash.exe my_script.sh It changes my Python Virtual Env depending of some conditions. For those who know Virtualenv, I need to ...
snoob dogg's user avatar
8 votes
1 answer
2k views

Files created in Cygwin have corrupt Windows security settings

On one Windows 10 PC, when I create a file from a Cygwin bash shell, the Windows security settings for the file are corrupted. So, for example, if I type echo test > test.txt, when I bring up the “...
Claudius Turner's user avatar
0 votes
2 answers
6k views

Running an .exe file in cygwin.

I'm absolutely new in CYGWIN and Bash in total, so, I guess that there is an answer somewhere in a documentation, but I'm not succeeded finding it. I have two files coexisting in a directory: file ...
Megabrukman's user avatar
2 votes
0 answers
421 views

cygwin + tmux and multiple bash processes

I have cygwin and tmux installed. Every time I run a terminal I also run tmux and then fire up weechat. When I have to leave, I just close the terminal window and tmux keeps running in background... ...
roughnecks's user avatar
7 votes
2 answers
4k views

How to programmatically clear buffers and caches in Windows

I need benchmark the speed of some bash commands in a Cygwin environment, and ensure that the tests I'm running don't hit the Windows buffers or the caches. Although I'm doing the benchmarking in a ...
Hashim Aziz's user avatar
1 vote
1 answer
270 views

Benchmarking bash commands with time and tee

I have a directory containing more than 80GB of simple text file databases that I anticipate needing to grep through often. For this reason, I'm trying to create some tests to compare GNU grep with ...
Hashim Aziz's user avatar
2 votes
3 answers
4k views

I want to type a tilde in bash, but pressing F10 gives me '1~' instead of just '~'

Previously I was able to output the tilde symbol in my bash terminal by pressing F10. Now when I press F10 I get two characters: 1~. Same goes for F9/F11/F12. Weirdly, the other function keys F1-F8 ...
user3055163's user avatar
1 vote
1 answer
1k views

Consequences of removing NUL characters from a text file?

I have quite a large text file (around 20GB) that I use as a simple database, so each record is separated by a new line, and the breaking of this format will cause problems. This file also contains ...
Hashim Aziz's user avatar
6 votes
1 answer
7k views

Dynamically append text to filenames in Bash

I have the following for loop to individually sort all text files inside of a folder (i.e. producing a sorted output file for each). for file in *.txt; do printf 'Processing %s\n' "$file" ...
Hashim Aziz's user avatar

1
2 3 4 5 6