Cannot use cd command to change directory in Drush (win7) - windows

I just installed Drush 6.0 on a Win7 machine. With cd command I can move around inside of C:\ but can't change to P:.
Cheers

I ran into the same issue you did a day or two ago. I realized that the drush command prompt uses most of the same commands that the Windows command line does so I did a quick search along those lines and was able to find the answer.
You need to either type the drive you want to change to (with no other commands and no slash) or you can navigate to the directory but include '/D'. Here are some examples.
P:
cd /D P:\wamp\www
Here is the website if you want more info: http://www.windows-commandline.com/windows-7-command-line-switch-drives/
Hope this helps!

install git bash and use this for your work on windows machine
or even better install linux as a virtual machine, as a developer you will love it after a few days
here is the link: https://code.google.com/p/msysgit/downloads/list?q=label:Featured

Related

Command not found in bas

I'm so sorry because I know this is a dumb question, but I've been trying to figure this out for about 2 hours and I can't figure it out. I've created a bash file that uses some other programs (tcpdump, tshark). The bash runs as it should but on every line that I use tshark, tcpdump, etc. it says "command not found".
I'm using Cygwin on my Windows 7 VM. All of the files are in the same folder and I I've tried adding the locations of the other programs to the PATH variable. I tried commands such as export PATH=$PATH:filelocation but when I do $PATH those results aren't showing. How can I get these commands to be recognized?
Thank you.
current errors
Cygwin is not a Linux distro, therefore, you don't have all the functionality like you would if you had a Linux installation.
You could try one of the following.
1) Use Virtualbox to make a VM of some Linux distro and use bash there. You could use Ubuntu server, which has no GUI.
2) Use this site to find packages that will add functionality to Cygwin.
3)Upgrade to Windows 10 and have a native (sort of) bash to use.

How to open gnuplot from mobaxterm?

I'm not sure how to open Gnuplot from MobaXterm. I've been trying many different commands but they all don't work. When I try, I get the same error.
-bash: gnuplot: command not found
I'm curious if I downloaded Gnuplot to the wrong part of the computer or if I'm not getting the command right? I'm trying to write a program in shell script that opens Gnuplot on it's own and plots data through the shell script.
Any help is appreciated!
mobaxterm is not a linux server. So you cant install packages into it normally.
you must download plugins if you can find the plugin you are looking for
check their list here
http://mobaxterm.mobatek.net/plugins.html
and it seems gnuplot is not there .
in this case your easiest solution is to download cygwin and add gnuplot on it which is possible
other option is to run small virtual machine so you can test on it
in all cases mobaxterm is not real linux enviroment so to be sure your shel do work on normal linux machines you will need to develop and test on real linux
You can install the winbuild of gnuplot and add the path to the bin directory, with gnuplot.exe in it, to mobaxterm's PATH (probably set it in .initrc or .bashrc, whichever you prefer).
MobaXterm is a standalone program which 'emulates' a Linux terminal but has no idea about your frame system (e.g. your Windows and your programs). So if you type 'gnuplot' Moba has no idea what is this. You have to
change the current directory to where is wgnuplot.exe e.g.:
cd /drives/c/Program\ Files/gnuplot-4/bin
./wgnuplot.exe
or run directly it:
/drives/c/Program\ Files/gnuplot-4/bin/wgnuplot.exe
or change your $PATH:
PATH=$PATH:/drives/c/Program\ Files/gnuplot-4/bin
wgnuplot.exe
or create a script named 'gnuplot' which runs wgnuplot.exe
#File name: 'gnuplot'
#!/bin/sh
/drives/c/Program\ Files/gnuplot-4/bin/wgnuplot.exe
and place it into some $PATH directory:
`/bin` or `/usr/bin` or `/drives/c/WINDOWS` or `/drives/c/WINDOWS/system32`
or... :)
The simplest way I found out is to use the Moba Package Manager to install the win version of gnuplot.
Open MobaXterm and type MobApt. An GUI will open up and you can type in "gnuplot" in the filter field.
Just select and install the package, MobApt will take care of any dependencies for you.

Unable to create vagrant file (homestead.yaml) on windows

I'm gonna to use vagrant on my windows desktop to develop Laravel project. I have followed all the steps to do that. But it has been failed to create homestead.yaml using bash init.sh command.
Below is the error :
Fakhreddin#Lenovo-PC3 /cygdrive/d/laravel-vagrant/homestead
$ bash init.sh
cp: unwritable ‘/home/Fakhreddin/.homestead/Homestead.yaml’ (mode 0500, r-x------); try anyway?
I'm using Cygwin for simulating Unix terminal in the Windows.
(Copy of the comment I wrote above)
Never used Cygwin in my life, but what I would try is to run it as Administrator and re-try.
Otherwise, you may want to consider changing console client. For example, if you install Git, you should be able to use Unix commands via standard Windows console.
I would seriously point the fault at Cygwin, or its settings. I am a member of a team in which all of us run Homestead on Windows 7, with no problems at all. The difference is, we use native Windows command line.

How to apply Magento security patches in xampp for windows

That must not be so difficult to do, I installed Magento CE 1.9 on xampp for windows. it works well.
I need to apply security patches that come only as .sh files, no other format is available.
I have the file, how can I apply it gives that I don't find a way to execute the .sh files under this environment?
thanks all
1) My windows has sh.exe available and can run .sh files - just type it into the command line, git bash works fine too.
UPDATE: my sh.exe was likely installed along with git. It is relatively easy to install though.
2) On windows machines you may need to edit the PATCH-... file. Find the CURRENT_DIR=``$PWD_BIN``/ line. Since you will be running it from the magento root directory anyway this can be left blank. Go ahead and remove everything after the equals sign. It should now read CURRENT_DIR=. See here for an explanation.
3)Now just move the file into your magento root directory and run it.
Try the Below Link Using Git-bash in Windows :
Magento Patch File Installation in Windows
Cygwin will help you to run the sh file.
cygwin
How to use Cygwin
Better you use git bash instead. Just go at the Magento Root and run {sh Patch_file.sh}.

How can I run PHPUnit from git bash on Windows?

I have Windows 7, phpunit is installed via these instructions: https://phpunit.de/manual/current/en/installation.html and works fine from regular cmd terminal, but phpunit is not recognized in the windows git bash terminal installed from git-scm.
I'm mainly a linux developer, so setting this stuff up on Windows is a little foreign to me.
Use alias native will be much better. edit ~/.bashrc, add these in it:
alias phpunit="php /C/Tools/php/phpunit.phar" // phpunit.phar in C:\Tools\php\phpunit.phar
copy the phpunit.phar file and rename the dumplicate file to phpunit
rename C:\bin\phpunit.phar to C:\bin\phpunit
Fix: PHPUnit not working with Git Bash in Windows
Just run into the same problem myself, see this answer provided at SuperUser https://superuser.com/a/663187, basically the problem is that Git Bash does not run ".bat" files:

Resources