Uploading symlinks to a server - symlink

Is it actually possible to upload symlinks and keep them as symlinks as opposed to uploading the files they're pointing to?
I have a directory structure that relies on symlinks and I'm looking for a way to send this to users who have no command line knowledge and would want to upload it to their servers.
Is there a way to create symlinks so that they're uploadable as symlinks? If not, is there an approach you could recommend?
Thanks!!!

Try tar-ing the directory structure into an archive? The users can then un-tar it on the other end.

thanks for the answers!
#Dav yes, that's definitely what I meant! I still need to upload the targeted files
#pavium you have a point though re: needing the command line to untar the uploaded file... , still i will look into it as it provides a packaging solution
I may have found another solution though, it seems PHP could handle the job with the symlink() function which could prove quite handy as all my symlinks are relative not absolute, meaning I could possibly create symlinks on the server without the need of a specific server information.

rsync -avlzp /path/to/folder user#somemachine:/path/to/new/folder

Related

Best way to make fake path in linux?

Working part: I have folder with images for my website, but for local purpose, it is not necessary to show real images. I wrote php script, which serves fake image only with text of whole demanded path, script is located on root of image folder and activated for everything by .htaccess.
The other part - making thumbnails by php script is working directly in filesystem, so Apache does not affect these - and I have problem with non existing folders, files, etc. Is there some nice way to make similar fake path directly in filesystem?
I'm using docker image for this problem, so I'm able to do everything inside this image.
I'm avoiding to make changes directly in the scripts, because of temporary situation of server changing (change the path to serve over apache etc is not possible).
Thank you for your advice :).
You could create a linux softlink directory:
ln -s file1 link1

How to disallow making changes or deleting file at main destination

Is there any way to prevent making changes/deleting files on partition or folder?
I need a solution, to allow workers to download/copy the file into their local folder but to disallow making any changes or deleting the file at the main destination.
A system which we using is Windows, and we currently don't use Windows Server.
Any ideas?
Best regards.
AK.
Modify the permissions on the folder they are downloading from to allow read but not write or modify for the user/pass they are using to access the share. Then they can copy the file to their local machine all they want but can't modify anything on the share folder.
The solution to this problem is software called "Easy File Locker" (freeware software) which one allows add localization which will be blocked from making any changes. To disable protection by application you must enter password and switch off software.
Best regards.
AK.

How does one add a single file to a perforce repository?

I have a large shared drive (~500Gb, 20k files, samba/afs). I would like to add all the files in there to a perforce repository.
I imagine adding/committing them all in one fell swoop is not a good idea.
How would I then to do that? Add/commit one by one? And would that ensure that the files on the shared drive are NOT locked?
I am comfortable with bash or perl, and this would have to happen under Mac OS X.
Bonus question: would the method also allow checking in the same files if they get changed on the shared drive via a cron job?
Thanks.
It will depend on your hardware what Perforce can handle. You should not likely have to add the files one at a time, however. This article here shows how to add whole directories at once:
Regarding your bonus question, yes you can easily handle files modified by your cron job by using the reconcile method. See the section 'Reconcile through the Command Line' in this article.

I am having trouble understanding IBM procedures

I am reading this file "readme_5202_P8CPE_IF001.htm" (Content Platform Engine 5.2.0.2 Interim Fix 1), and I encountered this procedure:
Copy the new Engine-xx.ear file into the following directory. This directory is a staging location. Do not delete or overwrite the currently deployed Engine-xx.ear file.
Windows
installation_location\ContentEngine\lib
UNIX
installation_location/ContentEngine/lib
What I don't understand is, how am I supposed to copy the Engine-xx.ear file to the specified directory without deleting or overwriting the existing Engine-xx.ear file there? Please bear with me if my understanding in English is not good.
Thank you very much!
That's a note (poorly explained, though) not to overwrite the original file (Engine-xx.ear), but to rename it, as e.g. Engine-xx-orig.ear, and store it aside (to have it if something goes bad with your upgrade) before copying/building the version from a fix pack to that same location.
Which is called a staging environment.
Because it's used to build a WAR/EAR for deployment.
Judging from the rest of the document, I belive that they are trying to tell you that you should follow their instructions carefully, and not try to be clever and overwrite the deployed application (at some other location).
I would give it a shot and overwrite whatever is in installation_location\ContentEngine\lib, the staging location. Make a backup of the files you overwrite in case it doesn't work out.

Storing temporary files

I would like to generate some temporary files in the course of my application. Specifically, I'm using AVAudioRecorder to record a file that I, upon stopping the recording, would like to load and edit/process. My question is:
What is the appropriate standard place to create temporary files. Is there some generally accepted approach to this for Mac or for iPad programming in general? I don't want to simply create a directory and write files into it if there is a proper protocol to this.
The answer to this question is actually a lot more complicated then one might assume. One cannot necessarily just use NSTemporaryDirectory and be done. I cocoadev.com has some good pages on this topic and I would suggest that you study them yourself and determine what will work best for your circumstance.
http://www.cocoadev.com/index.pl?NSTemporaryDirectory
http://www.cocoadev.com/index.pl?GettingTemporaryFolderOnSpecificVolume
The usual place for applications to store temporary data is /var/tmp. You could also use /tmp but this directory is for system-generated temporary files and anything in /tmp is deleted when the machine reboots.
What I found was that according to the iOS Application Programming Guide, I am supposed to query for the appropriate temporary folder for my application via NSTemporaryDirectory(). I tried this and it returned a folder within the /var directory, in my case '/var/folders/pQ/pQ+ZqZCSHWSIHftcbIo57U+++TI/-Tmp-/'.
/tmp or /usr/tmp are the usual places to store temporary files in Unix (which Mac OS X and iOS are).

Resources