I can't figure out how to copy a file in Windows Dos up multiple directories. Basically I want to replicate this linux command for windows
cp ../../../Dir/Item.o Item.o
Basically I need to copy an item that is up 3 folders from a folder called "Dir" into my current directory. I use this (in linux) as part of a build step and would like to do the same for windows. I have tried changing ".." and it didn't work.
Any help will be appreciated.
It's is almost the same on Windows. You need the correct command, and you need to use back slash instead of forward slash
copy ..\..\..\Dir\Item.o Item.o
copy ..\..\Dir\Item.o .
You need to use the back-slash as directory separators. . denotes the current directory
Related
Download binary packages on https://www.playframework.com/documentation/2.0/Installing gives me a play-2.0 folder with play exec file. However running play on that same directory using console returns
play: command not found
My environment is MAC and I tried
chmod a+x play
while running into the same problem
Can someone give me a guide on the installation process?
When we run a command, the shell look for this file (command) in a list of directories (folders). This list of directories is stored in a enviroment variable called PATH. If you want to see the values inside PATH. You can run:
echo $PATH
Note that the folders are separated by :.
The problem you are facing is because the shell can't find a dir that contains the file play. This happens because the play's dir is not in PATH
You can add play's dir to your PATH by running
export PATH=$PATH:/path/to/your/play/dir
This is a temporary thing. After you exit your shell session you will loose it. To make it permanent you need to edit the .bash_profile file in your home folder and add this command in the end of the file and save it.
Not able to install plugin its showing the below error...
C:\devbox>vagrant plugin install 'vagrant-hostmanager'
The directory where plugins are installed (the Vagrant home directory)
has a space in it. On Windows, there is a bug in Ruby when compiling
plugins into directories with spaces. Please move your Vagrant home
directory to a path without spaces and try again.
Ruby (language used by Vagrant) has "issues" with directory names that contain spaces.
Vagrant will use an environment variable (supplied by windows) to tell it where your user directory is (so it can decide where to put your "home" directory). But you might have a space in your user name (I do) which causes a problem for ruby (which is doing the work to install the plugin).
The solution is to move your project to a project directory you choose that doesn't have any spaces in the directory name. Then, use an environment variable called VAGRANT_HOME and set it to a specified directory. The plugin installation procedure will check for the existence of this variable and use it if it exists instead of locating a home directory within the windows current user directory.
I created a folder called home within C:\Hashicorp\Vagrant and used that (C:\Hashicorp\Vagrant\home).
Setting windows environment variables is not hard (rather trivial actually) - you can find out how here: http://www.computerhope.com/issues/ch000549.htm
You'll have to do a restart to your system for it to take effect (it all worked after a reboot for me).
I've found a slight variation to the #Reinsbrains answer. In order to have a home directory without spaces within its name. I created a junction to my user/home directory. In my case I decided to go with a Linux style structure, but any location would work. In an admin command prompt:
mkdir c:\home
mklink /j c:\home\maarten "c:\users\Maarten Bicknese"
Next set the VAGRANT_HOME environment variable to the newly created junction.
setx VAGRANT_HOME c:\home\maarten
Fire up a new command prompt and you're good to go!
I'm trying to refactor classes from my local working copy due to an urgent refactor needed after a bug fix.
So what i am doing is, using cygwin, move to the dir where my exlipse workspace is located and run this query
find . -name "*.java" -exec sed -i 's/bug/big fix/' {} \;
I simply need to replace 1 line of code,
The issue is, that this affects also classes that does not contain tat bug, i see that by looking at the java files in svn, right after running my command on the java files icons in eclipse it appears the brows asterisk appears, and if i run a diff, i see that all lines differs, even though i thought not even one line should be modified.
My local working copy is on a windows file system, any advise?
#Aurand is probably right, it sounds like a line-ending issue. Reset the repo, then add the -b option to sed to preserve line endings.
Now I'm using Padre IDE. Since I am using that, It uses different perl.exe file to run the code.
But by default perl.exe path is set to C:\Perl\bin\perl.exe. I want to change this path to IDE path. How to change this ?
This path is save in environment variable PATH (Advanced System setting->Advanced->Environment Variables).
The search path is stored in the PATH environment variable. The path to the IDE version is either missing or comes after 'C:\Perl\bin' in the list.
At the command line, you can view the setting with this command:
echo %PATH%
If it's just missing, this command will add the one you want to the front of the list:
setx PATH "Path\To\IDE\Perl;%PATH%" /m
Actually, that should work in any case - nothing should break because of a duplicated entry in the list.
I have a folder tree which contains my C++ files. After reading this document,
http://www.gnu.org/software/emacs/manual/html_node/ebrowse/Generating-browser-files.html#Generating-browser-files
still don't know how to parse all my c++ files in folder tree easily.
I can execute the command below in each folder manually, but looks stupid. I can write some scripts to do it recursively, but want to know any better idea here.
ebrowse *.h
I use ebrowse at work. I don't have my bash alias at hand, but from memory it looks like that:
ebrowse $(find . -name "*.[hc]pp")
Don't hesitate to replace the . with the path to the root of your project.
How about open it in dired buffer, then M-xfind-name-diredRETRET*.ht!ebrowse * ?
In other words: use dired to locate all files you need, then run shell command on them, shell command being ebrowse?
How'bout ebrowse **/*.h **/*.cpp? Don't know which shells support ** nowadays, but at least Zsh has supported it for a decade or two.