1
vote
1answer
11 views

Trouble creating real NTFS links using Cygwin

I have administrator privileges and would like Cygwin's ln -s to make NTFS links instead of the fake !<symlink> files that only Cygwin understands. I tried the following, based on Cygwin ...
0
votes
0answers
21 views

Batch replace non-ASCII characters in filenames

I'm looking for a shell script that will recursively replace non-ASCI characters with underscore or just remove them. The issue is that a drive with files, created on Linux, has to be used on ...
0
votes
0answers
8 views

How to query mssql db from bash on subsystem for unix

I have a script that is used to query a database and use the result set for further processing. This is a shell script that runs on bash. But the bash used is the one shipped in subsystem for Unix for ...
0
votes
1answer
17 views

Do I have to manually update my PATH in Cygwin shells?

I use Cygwin on Windows 7. I'm not really a Windows user, so it's already a little inconvenient for me to have to have this extra layer in between my OS and Zsh, my shell of choice. Now, I frequently ...
2
votes
2answers
38 views

Looking for a way execute a task on all files in a directory (recursively) on Windows

I have a huge number of mp4 video files that needs to have a volume boost. I need a way to execute a ffmpeg audio filter on all files in a specified base directory (and in subdirectories as well). My ...
0
votes
0answers
22 views

How to rewrite bash shell script to nyaos script

I'm using this small shell script named zip0 in linux environment. #!/bin/bash zip -0rq "${1}.zip" "./$1"; I also want to use this function in windows nyaos script. By direct input from shell $ ...
3
votes
2answers
222 views

Practical (closer to the classical Linux one) way to use (automate) SUDO for CygWin

Being able to use sudo commands in CygWin is useful, and faster than opening an elevated shell: Luis@Kenobi /cygdrive/c/Users/Luis $ net user /add TestUser System error 5. Access denied. Luis@Kenobi ...
0
votes
1answer
53 views

Confirm if directory exists in a specific location then Run cmd 1 if not cmd 2

I have two scripts that I would like to merge into 1 batch file. The scripts just delete temp areas on windows 7 or xp, I would like to combine them by creating a conditional statement that states IF ...
1
vote
1answer
83 views

How can I run a Cygwin command (not a Windows native command) as privileged?

If I open a (elevated via UAC) Bash Shell in CygWin: Luis@Kenobi /cygdrive/c/Windows/system32 $ crontab.exe -l -u Luisito must be privileged to use -u Tested on WinXP-SP3 and Win7-SP1. Same results ...
1
vote
1answer
185 views

Running a CygWin shell: what windows console (DOS) commands do disappear?

If under my Windows with CygWin (v2.831 32bits) I do: cmd mode 80,50 the screen width changes, but if I open a CygWin terminal, like bash: C:\cygwin\bin\bash --login -i $ mode 80,50 bash: ...
1
vote
1answer
282 views

Launch multiple programs in background on windows 8.1

I want to start (launch) three programs in windows and all of them in Background i.e. No windows. I found two ways (both using vb script to hide a bat) Set WshShell = ...
0
votes
0answers
30 views

msysGit (Windows) and gpg-agent

Does anyone have a working setup to use gpg-agent in combination with msysGit on Windows? I have a setup for ssh-agent and it works fine but I can't get gpg-agent to work on Windows. I tried both a ...
1
vote
3answers
46 views

Is there a tool that could help me use my Linux scripts in Windows? [duplicate]

I am new here. I would like to know if there is a tool that would help me use my Linux scripts in Windows? I am more comfortable with Linux commands than Windows. I also tried to download a software ...
0
votes
1answer
55 views

Restricting MSYS (Bash) auto-completion to current directory

I'm using MSYS on Windows 7 and I really enjoy the TAB auto-completion feature of the bash console. However it appears that this feature queries all directories in Windows' $PATH variable, requiring ...
0
votes
1answer
33 views

Is it possible to connect to the local Windows shell with PuTTY?

I don't know of a working Windows SSH server (not one that I trust enough, yet, at any rate). Therefore, I can't simply connect to localhost on port 22 from PuTTY. I want to use PuTTY because the ...
1
vote
1answer
294 views

How to add more commands to Git Bash Shell

I am working on windows machine and I use bash shell which comes with git. But there are many utilities which are missing in this version of bash shell. How can I install more commands on this shell. ...
1
vote
0answers
173 views

Bash 4.2 on Windows without virtual machine?

I'm looking for the way to run bash 4.2 on Windows without a virtual machine. I've tried with CygWin, but the latest version that you can install is bash 4.1, and I didn't find a way to install bash ...
0
votes
1answer
104 views

How do I access this environment variable in the windows git bash shell

I am trying to configure my windows portable git bash shell. When I execute env I get: ANT_HOME=C:\Program Files\WinAnt PORTABLEAPPS.COMVIDEOS:FORWARDSLASH=H:/Documents/Videos ...
1
vote
0answers
35 views

Msys cd .. command takes me to home directory instead of parent

I'm using Msys on Windows 7 with what I believe to be a Bash shell. I want to navigate the following directory structure: Drive (M:) +--- Coding +--- CPP +--- projects +--- ...
3
votes
1answer
437 views

How to check if cygwin mintty/bash is run as administrator?

Problem Statement: What is the most elegant and robust way to test if Cygwin mintty bash session is "Run as adminstrator"? Why, specifically? I have typically several mintty terminals open when using ...
1
vote
2answers
135 views

Ignore NTUSER.DAT files when ls on Git Bash?

I use Git Bash as my terminal on Windows. When I ls in my Home directory, I see some NTUSER.DAT entries, which I assume are system files. They don't appear when I run dir in the default Windows ...
1
vote
0answers
40 views

Script to port specifc data from doc1 (notepad++) to specific place(s) in doc2

I really appreciate your help with a windows script or regex function that ports specific data from doc1 (xml in notepad++) to specific place(s) in doc2 (notepad++). I'm running win8. Thank you in ...
1
vote
1answer
209 views

Redirecting “time” command output to file in Cygwin

I'm trying to redirect the result of "time" command in Cygwin to a file, and I'm not sure how to do it. I've tried time app.exe > /file/path/file.txt, (time app.exe) > /file/path/file.txt, time ...
1
vote
1answer
92 views

Making bash command history act like Windows command shell

In bash, up arrow recalls the previous command. Tap it twenty times, I get the command from twenty places back in history which I ran five minutes ago. Suppose I run that command right now. Now when ...
2
votes
2answers
431 views

How to invoke Windows' gvim in a Windows environment from within Cygwin?

When I give a gvim command in Cygwin, I want it to invoke the gvim I've installed in my Windows. I tried writing a function in my .bashrc called gvim that invokes the gvim.exe in my Program Files ...
0
votes
1answer
78 views

Cygwin Syntax Trouble

I'm on windows 7 using Cygwin. My script and text file are located in the same directory. #!/bin/bash while read name; do echo "Name read from file - $name" done < /home/Matt/servers.txt I get ...
3
votes
2answers
6k views

Cygwin Dos2Unix Command not found

I am having some problems using cygwin. I am trying to use the dos2unix utility and cygwin is throwing -bash: dos2unix: command not found When I go back into the installer and look through the ...
-1
votes
1answer
97 views

Can't load a .bash_profile on windows powershell

I'm looking to load a .bash_profile with some aliases and functions on launch but, I haven't been able to find a way to load the .bash_profile. I'm not even sure if it is possible.
4
votes
4answers
8k views

How can I use a bash like shell on windows

I use Linux and a Mac. I'll be teaching some command line stuff soon. What can I install on Windows to give me a terminal window most similar to a basic mac/linux bash shell. Would like to be able to ...
0
votes
1answer
181 views

How to extract a record in a text on string match in a file using Bash

I have a text file sample.txt as: =====record1 title:javabook price:$120 author:john path:d: =====record2 title:.netbook author:paul path:f: =====record3 author:john title:phpbook subject:php path:f: ...
0
votes
2answers
103 views

Replacement for sed and 'open' in windows

I have the following bash script that takes a text file and opens a tab in the default internet browser with a google query (after some clean ups) per line. I want to make a version of this script ...
-1
votes
1answer
153 views

Can I have 2 folders from 2 different servers in sync one way

Can I have 2 folder from 2 different server in sync one way! I have a Windows server, Server 1 :public server a Windows server, Server 2: local on my network :under NAT The problem is that I get ...
0
votes
1answer
109 views

Having Trouble Sending Arguments To Mintty/Cygwin

Simply put, I would like to have a shortcut on Windows which can open up a terminal window just like clicking the Cygwin shortcut normally does, but in a different location from the default. The ...
0
votes
3answers
169 views

How do you install Bash or Bash utilities on Windows? [duplicate]

How can I install Bash for Windows so that I can use its utilities, such as grep, vim, and gcc with minimal amount of work in editing the environment variables to include them all. I'd like to do this ...
3
votes
4answers
2k views

How to use Cmd's tab autocomplete effectively?

I've used the Bash shell on Linux for years and I'm very fast with it. By frequently appealing for autocomplete by hitting the tab key, I'm able to write long commands in few keystrokes. Recently at ...
1
vote
1answer
98 views

Windows SymLink Questions: How do I tell if a file is symlinked /

I'm not exactely sure how to phrase my questions, I'll describe what I'm doing, perhaps my misconceptions will show. I'm on windows 7. I symlinked files that I'm working on in a project to a sandbox ...
2
votes
2answers
335 views

How do I disown/detach a process from the Git Bash terminal that come with Git's Windows installer?

I would like to run commands from the terminal (mostly Python servers) and essentially daemonize them. I am running the MinGW terminal "Git Bash" that comes with the Windows installer for Git. ...
0
votes
2answers
487 views

Run windows bat remotely file from Linux over ssh

It is possible? Cygwin is installed on the windows environment. I connect to windows environment over ssh with follow command: ssh user@ip /cygdriver/c/run.bat. After introducing the password the ...
0
votes
3answers
153 views

How to mount a Windows shared drive on OS X given a Windows user like this: myserver@mydomain.com

I have a script in OS X which is something like this: tell application "Finder" try mount volume "SMB://myuser:mypwd@myhost/sharedfolder" end try end tell It works fine, but now ...
2
votes
2answers
91 views

Run Total commander from bash on windows

I am trying to setup alias/function to call Total Commander from bash (MINGW) on windows. So far all my attempts failed, the closes function tc() { dir="$1" if [ "$dir" == "" ]; then dir="." ...
1
vote
1answer
744 views

Convert Linux symlinks to Windows symlinks

I've noticed that Linux symlinks don't work in Windows, and vice-versa. Is there any way to convert Linux symlinks to Windows symlinks? Specifically, I want to convert relative Linux symlinks to ...
1
vote
2answers
597 views

Accessing a remote Windows “Git Bash” prompt from a Linux machine?

"Git Bash" is a program that comes with Git for Windows. In order to get to a Git Bash prompt on a remote Windows machine from a linux machine, my usual process is to use remmina to open an RDP ...
0
votes
0answers
107 views

Analogue of the “tail -f example.log” command in Windows?

Is there a similar command in Windows?
0
votes
1answer
522 views

cmd.exe quoted string expansion?

Bash has the feature of quoted string expansion, which will allow you to send special characters like so #!/bin/sh rtmpdump \ -r rtmp://freeview.fms.visionip.tv/live \ -y ...
1
vote
3answers
1k views

windows CLI looking like ubuntu terminal [closed]

How can I make my windows 7 command line interface to look like the terminal in Ubuntu ?
4
votes
1answer
382 views

Is there an analog of Bash's Ctrl+Z & fg in Powershell?

I find the combination of Ctrl+Z with subsequent fg on Bash very handy, it's like a command line analog of alt+tab, so I can switch from viewing one file to the output of a running process etc. Is ...
41
votes
2answers
9k views

Git Bash Here in ConEmu

How do I create a right-click context menu entry to open Git Bash at a given folder within ConEmu? See Git Bash Here in Console2 for the equivalent question for Console2.
0
votes
3answers
239 views

Windows batch command equivalent for these PHP and Bash commands

What are the equivalent commands in Windows if I have these commands in Linux? if (!is_dir('geoip')) mkdir('geoip', 0744); shell_exec('unzip -oj GeoLiteCity.zip -d geoip/'); shell_exec('rm -rf ...
0
votes
2answers
179 views

PHP crazy behavior on mount

I have a mount to my windows machine on a linux machine. When I try to run any php scripts there it says it's not found, however, when i copy the files to the local storage it runs with no problem. I ...
1
vote
1answer
62 views

mapping cntrl+p , cntrl +n in command prompt

I m looking for a way to map CNTRL+p and CNTRL+n in command prompt to previous and next command in history. I m aware of F3 and up/down key but I m habituated to CNTRL+p/n on linux.