Cannot find cygwin directories in Windows? [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am using cygwin to learn BASH scripting inside windows. I created a directory /mystuff/unixstuff. I tried searching for this unixstuff directory in windows, but I cannot find it. Where does cygwin create files and folders ?

Cygwin's root (/) directory is wherever you tell setup.exe to put it when you first install Cygwin.
I think the default is C:\cgywin. I've also used D:\cygwin.
You can use the cygpath command from the Cygwin bash shell to tell you. I'm not on my Cygwin system at the moment, but I think cygpath -w / will show you the Windows path of the Cygwin root, and cygpath -w /mystuff/unixstuff should tell you the Windows path to your /mystuff/unixstuff directory.
BTW, the usual convention for Unix-like systems (including Cygwin) is to put your own files under your home directory. Putting things directly under the root, as you've done with your /mystuff directory, risks interfering with system files. (Your home directory is probably /home/username, or in Windows something like C:\cygwin\home\username.)

Related

Powershell and CMD can't find any builtin commands [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last month.
Improve this question
I'm unable to use any common commands in windows cmd or powershell. For every command I get this error:
ssh: The term 'ssh' is not recognized as a name of a cmdlet, function, script file, or executable program.
Or:
ipconfig: The term 'ipconfig' is not recognized as a name of a cmdlet, function, script file, or executable program.
The ssh.exe is present though, so it may be an issue with wrong paths. I checked system variables and everything seems fine. What could be the issue here?
Check the environment variables such as %PATH% and %COMSPEC%. Most likely, there is a problem with %PATH% and it is missing some default directories that it usually contains.
Also try running sfc /scannow.
AFAIK, %PATH% by default includes these directories:
C:\Windows;
C:\Windows\System32;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0
But this can change from system to system and perhaps Windows versions. Software you install on Windows may change %PATH% and add new directories into it.

How to use program name with out specific path in .cmd file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
When I usually type following command in command prompt,
pageant "C:\Users\test\.ssh\id_rsa.ppk"
It have worked well.
But on the other hands,when I make test.cmd file like
pageant "C:\Users\test\.ssh\id_rsa.ppk"
And then double click, it didn't work
buttest.cmd in following script
"C:\Program Files\PuTTY\pageant.exe" "C:\Users\test\.ssh\id_rsa.ppk"
work well.
What is the different between them ?
I guess The path was recognized by cmd.
If someone has opinion, please let me know
If the command doesn't contain an absolute path and isn't an internal command then cmd.exe will find the executable in the current folder and then look in the folders in the %PATH% environment variable. It looks like the current folder in your cmd is C:\Program Files\PuTTY so pageant can be found and execute normally. If you cd to a different folder then it won't work unless the folder exists in %PATH%

Where is "xcopy" usually located on a development machine? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have a build process that needs to use xcopy. I am getting an error, and I want to make sure that it is finding the command ok.
But google is not helpful when searching for where xcopy would be located on my (or my build) machine.
What is the file path to XCOPY?
Usually %WINDIR%\system32 e.g. C:\Windows\system32.
Be aware that on a 64-bit machine, there's some magic going on with the result that what appears to be C:\Windows\system32 is actually C:\Windows\SysWOW64. However for your purposes I don't believe this should matter.
xcopy.exe is located under C:\Windows\system32\xcopy.exe. There also exists a 32-bit version under C:\Windows\SysWOW64\xcopy.exe if you're running an x64 version of Windows.
The following command line show where the xcopy.exe file is located so it is equivalent to where xcopy.exe command, but it works in any Windows version:
for %a in (xcopy.exe) do #echo %~$path:a
If you really want it to be accurate, you should use the same method Windows uses to load an executable.
Where is a 3rd-party utility including source, that has an excellent explanation of how Windows locates an executable, dll, etc. It also matters whether you run it via ShellExec or CreateProcess

Can I install a msys .bashrc file on a usb drive? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm using Git-bash (msys) as my command line tool. I would like to have basic commands like:
export PATH=$PATH:/f/ppython275/App/Scripts
run automatically when I start my shell, but I would like it to be completely self contained, i.e. have the .bashrc file on my usb drive. Is this possible. If so where should I put the .bashrc file
The .bashrc must reside in ~ in order for it to be loaded automatically when you start Git-bash.
There are a couple of options:
Create a symbolic link (using mklink in Windows). This is only supported on NTFS filesystems and I believe it would work across filesystems.
Create a simple .bashrc file in your ~ that sources the file on the USB drive:
source /path/to/USB/based/bashrc

Lost terminal PATH, cant use any commands or access directories [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I was trying to setting up Sublime text 2 for the terminal using this. It didn't work, and now the terminal cant access any directories or use simple commands like ls or cd.
Examples
$ ls
-bash: ls: No such file or directory
$ python
-bash: python: No such file or directory
I think my PATH is screwed up but i dont know how to fix it. Thanks in advance
Also if I echo $PATH, it is blank.
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This is a reasonable default. Run that at your terminal to fix that shell's path. Note that it won't affect other (future) shells.
You can run commands by typing their full path, e.g. /bin/ls. Use an editor this way to fix whichever startup file you messed up.

Resources