Create a symlink to a directory on another network machine - macos

This is the problem: I am creating some files on a machine running some process, and I would like to have a second machine to create a symlink to this folder.
Not sure thou what should I do to make this happen. should I make a dir on my main machine and share it with the second? otherwise ls -s won't work if I specify a network path to the main machine (they are on the same network, but one just run terminal, no GUI or X server; the main machine is a mac with OSX lion on it).
The objective is to have machine 1 make these files, and machine 2 makes a symlink to this folder, use these files, then remove the symlink. I could copy the files over to the second machine, but these are pretty big files, and I have very little space available on the second machine (it is not a computer in the common form of the term...it is a SOC on a custom board, that I'm checking out, similar to the raspberry pi or the beagle bone).
Thanks

Related

Missing lxss folder in Windows, can't access Ubuntu's files

I installed a Linux Ubuntu subsystem onto my Windows 10.
Ubuntu itself works fine and I can access all the Windows files without a problem.
But somehow I can't access the files the other way around, meaning I can't find the lxss folder where all the files from Ubuntu are stored.
I already made all folders visible, even the system ones. There just isn't a lxss folder.
In fact, there is not a single lxss folder on the whole drive.
Ubuntu must save the files somewhere, I just don't know where...

Using a local editor with Vagrant

I typically use the atom editor for any coding work and have folders on my computer with the code. After doing some updates on my Mac OS computer, some ruby gems stopped worked, rvm no longer responded and homebrew gave me a ton of trouble. I want to prevent this from happening again and figured I'd use Vagrant instead. I like it so far and it works fine, however I want to use my Atom editor nevertheless.
Normally I work on projects using gulp or grunt and they compile the files whenever any changes are made. While I have managed to connect to Vagrant with FileZilla, I have no idea how to connect atom to it. All I need is to edit the files in the Vagrant VM, as I would if they were stored in regular directories on my Mac. Any idea how to solve this?
you can certainly use your current workflow but you do not necessarily need to connect to your vm using Filezilla or another protocol.
The best is to look at Synced Folders and synchronized your project directory. By default vagrant synchronized your current directory (where the Vagrantfile is store) to the /vagrant directory in the vm. so if you can place your project directory within the same folder, they will be automatically synchronized.
If Atom (I am not user of this editor) have a special folder where you store your project files, you can add this folder as synchronized folder. Add the following to your Vagrantfile
config.vm.synced_folder "/Users/fhenri/project/tac.local", "/project"
In my case this synchronized my host (mac os) folder /Users/fhenri/project/tac.local to the vm folder /project so whenever I make a change in this folder, I can see the exact same change from the vm.
If you use ruby and gems, it might be good to install the gem locally (within your project structure that you can share between the host and the guest) so they are automatically reflected in the 2 environments when you make a change.
When you're using gulpor grunt you would launch them from the vm, working on a synchronized folder and all the changes you will make from the mac os host would automatically be picked up on the vm. I remember when working with default Virtual box sharing folder, automatically is not flash light, you should allow a few seconds delay but still it is working.
If performance is becoming an issue, you can look at nfs synchronization type by making the change
config.vm.synced_folder "/Users/fhenri/project/tac.local", "/project", type: "nfs"
It should improve a bit

Meteor Vagrant: Where should the project code files be?

I have successfully configured Meteor on my Windows machine via vagrant along with running the sample app in the browser by following the tutorial given at https://gist.github.com/ahoereth/2607d2ee99103a0a9bc9.
For the last two hours, I have explored all of the Window's directories in search of the code created by meteor create sampleapp command, but I can't find any clue where the code is. As vagrant claims that code is in the Windows directory not the VM box, can anyone give me a hint where it could be hiding?
The directory that's shared with the Windows host is the /vagrant directory. In the VM, the home directory might be different, and won't be visible from Windows.
However, if you want to run the Meteor app from the shared directory, be prepared for a world of pain whenever you install a package that has a : in its name, as Windows won't support that character in the filename, and you'll get a cryptic error in the VM.
Since packages in Meteor 0.9+ regularly have : in their names, developing Meteor apps in the VM/Windows shared directory is a no-go.

Mirroring folders

I want to know if there is a way to have mirror
folders with a remote machine. I see some solutions for
syncing folders with a backup drive, but I am not interested
in that. I want to sync a folder with a remote machine through
ssh. I am on OSX leopard
Ted.
Check out the rsync command line utility. You may even be able to find some good GUI applications that build on rsync. Although I haven't tested it, Grsync looks promising.

What to copy when moving cygwin from one machine to the other?

I'm reinstalling everything on my machine, and amongst those is Cygwin. I'm trying to avoid reinstallation, partly because I don't even know what it is that I've installed. Can I just move the Cygwin directory from one machine to another and expect everything to work, or are there some other important settings that I need to move as well?
As far as I saw, it's pretty self-contained, but one never knows.
Yep! Go for it. You won't encounter any problems.
You can just copy the entire cygwin directory to your new machine, open up the cygwin shell and everything (as long as you are only calling cygwin-internal programs and stuff that's within the path) will just work as if you you are working on your old machine.
The only thing you'll loose is the directory where the "already downloaded and compressed" packages for a possible re-installation are stored. Fortunately this directory is optional, so no problem for migration to another platform. You could copy that directory as well, but most likely all the packages that you have are outdated anyways and a run of setup.exe would fetch the new versions anyway...
Btw - since someone said exactly the opposite some real-life experience: I use this feature quite often with success. I've copied my cygwin dir to USB-sticks and used it on friends computers. I also copied it to the laptop of my fiance when we go to holidays and take a laptop with us.
It always worked without any problems....
The short answer is: No, you can't copy the whole Cygwin folder. You just copy the configuration files(bash files, vim file, etc.) you need.
The long answer is: If you copy the whole Cygwin folder, it may work in some case, and may not in some other case.
The reason is: you will lose linux file mode when copying files on Windows. And that will cause a lot of troubles. However, you may not have the troubles when you use Cygwin just like a common Windows Program(which means you don't care file mode and anything related), and run it as Windows Administrator(which is not required when Cygwin is installed as usual).
BTW: you can export the packages you installed by cygcheck.exe -c and install them on the new Cygwin. You can also install/update Cygwin packages by Cygwin's setup-x86_64.exe in command line like:
setup-x86_64.exe -q -P package1,package2,package3
No, you have to reinstall it from the cygwin installer, sorry!
Most importantly you'll want to copy everything from your home directory (default is c:/cygwin/home/) especially anything w/ a "." in front of the filename.
As for individual application preferences, etc., you may lose those -- but if you do the reinstall while you still have access to your old machine -- you can probably get to 90% of your previous install without too much trouble.
My experience with copying from one cygwin64 (I don't think there is a difference) to another machine is that all of the symbolic links got crushed:
As an example:
What used to be /usr/bin/cc -> /usr/bin/gcc.exe (or something like that)
After the copy /usr/bin/cc became a text file containing the string:
!<symlink>/usr/bin/gcc.exe
My method of copy was merely cp -r /cygwin/c/cygwin64 <dest>
My dest was a FAT32 FS, but I don't think that had anything to do with it.
There were also characters 0x00 and 0xFF sprinkled among many of these 'text' files so that they appeared to be binary.

Resources