Windows how to create directory symlink - windows

im trying to create a symlink to directory Windows 8.1
using git-bash command windows run as administrator
having the folder structure like this:
-magento plugin
-magento
where my plugin is a git repository i want to symlink it to magento as mentioned here: http://inchoo.net/ecommerce/magento/how-to-setup-git-for-magento-extension-development/
so i run command to create symlink
$ ln -s D:/wamp/www/plugin-magento/app/design/adminhtml/default/default/template/company/name/ d:/wamp/www/magento/app/design/adminhtml/default/default/template/
company/name
where:
D:/wamp/www/plugin-magento/app/design/adminhtml/default/default/template/company/name/ has subdirectories and exist
and
d:/wamp/www/magento/app/design/adminhtml/default/default/template/ exist
i get error:
ln: creating symbolic link d:/wamp/www/magento/app/design/adminhtml/default/def
ault/template/company/name' toD:/wamp/www/plugin-magento/app/design/adminhtml/def
ault/default/template/company/name/': No such file or directory

Under Windows you create a symlink with mklink /d. Attention under Windows its target and then source.
mklink /d "D:\wamp\www\magento\app\design\adminhtml\default\default\template\
company\name\" "D:\wamp\www\plugin-magento\app\design\adminhtml\default\default\template\company\name\"
http://www.sevenforums.com/tutorials/278262-mklink-create-use-links-windows.html

Related

Installing Github .zip files on Chromebook via Linux

I'm using a Linux Debian terminal, trying to install a Github .zip file by following a walkthrough (from Chromebook). They're using a Windows terminal and access the zip file from a G: drive. They run the following:
C:\Users\zasur>G:
G:\>cd filename.zip
G:\filename>npm install
Which installs the Github zip. I've looked all over online and tried a few different solutions but can't get past the second command they run.
I was able to open /mnt/chromeos/MyFiles/Downloads from Linux by sharing the Downloads folder with it.
I'm not sure how to change the directory from here to the filename.zip and/or run commands from it. Whenever I try to run cd filename.zip or cd /mnt/chromeos/MyFiles/Downloads/filename.zip it always fails. Is this even possible on a Chromebook?

Windows 10 WSL - Maven config

Is there a way to configure Windows Maven and WSL Maven to use the same .m2/repository and settings.xml?
In my .bashrc from WSL I added the M2_HOME to use the same installation that Windows 10 use:
.bashrc:
export M2_HOME=/mnt/c/development/maven
Windows PATH:
C:\development\maven
But when I execute mvn clean install on Windows Bash, a .m2 folder is created in ~/.m2 (WSL folder system).
Found a possible solution.
I created a symbolic link from ~/.m2 to /mnt/c/Users/<username/.m2
Command: $ ln -s /mnt/c/Users/<username>/.m2 ~/.m2
Until the moment is working fine.
Just an amendment to #Vitor 's response:
When you created the symbolic link once, the next time (e.g. if you specified a wrong directory and want to retry) you cannot create it and you will get failed to create a symbolic link: file exists error.
As a workaround when you want to recreate the symbolic link, you can use $ ln -f -s /mnt/c/Users/<username>/.m2 ~/.m2
[OPTION]
-f, --force
remove existing destination files

Windows Shell Script Default Folder

I'm trying to create a shell script for deploy a django application in Windows 10. I'm just at the beginning but what I want to do is:
Create the directory C:\Software\MyApp;
Clone the project from GitLab in C:\Software\MyApp;
Install virtualenv in C:\Software\MyApp\py2_env;
So I wrote this script
# setup folser
cd C:\
mkdir C:\Software\MyApp
cd C:\Software\MyApp
# clone application
git clone https://gitlab.com/blablabla/Application.git
# virtualenv
pip install virtualenv
virtualenv C:\Software\EVARplanning\py2_env
C:\Software\EVARplanning\py2_env\Script\activate
I save it in a file called installation.sh that is in my Desktop folder. The problem is that when I double-click it, it create an "Application" and "SoftwareMyApppy2_env" folder in my Desktop (C:\Users\<user>\Desktop).
The strange thing is that if I open a terminal and copy/paste those commands one by one, they work perfectly...
Can you tell me what I wrong?
Thanks

Flume configuration

I am trying to configure Flume. When I run the following command:
sudo mv Downloads/flume-sources-1.0-SNAPSHOT.jar /usr/lib/apache-1.7.0-bin/lib/
I get the following error:
mv: cannot move Downloads/flume-sources-1.0-SNAPSHOT.jar' to/usr/lib/apache-1.7.0-bin/lib/': No such file or directory.
Any one can help me please?
Thanks.
In step 5 you are asked to download the file:
Use below link and download flume-sources-1.0-SNAPSHOTS.jar
https://drive.google.com/file/d/0B-Cl0IfLnRozUHcyNDBJWnNxdHc/view?usp=sharing
Then at the start of step 6 it says:
Move the flume-sources-1.0-SNAPSHOT.jar file from Downloads directory
to lib directory of apache flume:
Command: sudo mv Downloads/flume-sources-1.0-SNAPSHOT.jar /usr/lib/apache-flume-1.4.0-bin/lib/
This step has assumed that your downloads folder is called Downloads and is a subfolder of the one that your console is open at the time. If this is not the case, use the cd command to move to the folder where the newly downloaded file exists, and run sudo mv flume-sources-1.0-SNAPSHOT.jar /usr/lib/apache-flume-1.4.0-bin/lib/
Alternatively if you have access to a desktop on the machine, just cut and paste the downloaded file from where it went when you downloaded it from the internet into the folder /usr/lib/apache-flume-1.4.0-bin/lib/

Operation not permitted and permission denied

My mac version is 10.12.2.
I'm trying to install R studio and a number of other softwares, but it doesn't work. I suspect it's because of permission issues - my mac doesn't allow them to create directories during installing.
~$ pwd
/Users/biona001
~$ mkdir fdsa
mkdir: fdsa: Operation not permitted
but if I'm in a higher director, it says something different
~$ cd ../
Users$ pwd
/Users
Users$ mkdir fdsa
mkdir: fdsa: Permission denied
and if I move into a lower directory, it works
Users$ cd biona001/Documents/
Documents$ mkdir fdsa
Documents$
I googled almost everything without finding anything that worked, including the one where I boot my mac into this weird mode and type some command. I should be the administrator of this mac.
R Studio is installed by dragging the application to your applications folder. It requires R to be installed. R can be installed from a package, so you don't need the command line.
The 'administrator' on the mac, does not have permission to write files or create folders anywhere. It's not a good idea in any case.
If it's absolutely necessary, you must enable 'root' and login as root. But this is not necessary to use R Studio and R.
Enabling root access without knowing exactly what you are doing is a recipe for disaster.
I had the same "operation not permitted" issue on MacOS Sierra.
Looking at the user's home folder in Finder as John Elemans recommended, showed that the home folder was locked. Unchecked the locked checkbox in finder and was able to create a subfolder in the user's home folder via terminal.

Resources