On a server, the directory structure is already organized like this. (For sake of argument, I can't change it. I can only figure out a way to make it more useful to me.)
/work/product/versions/app-0.98 /work/product/versions/app-1.0 /work/product/versions/app-1.1 /work/product/versions/app-1.2
Inside each directory are several files, for example:
/work/product/versions/app-0.98/app-0.98.1234 /work/product/versions/app-0.98/app-0.98.1235 /work/product/versions/app-0.98/app-0.98.1236 /work/product/versions/app-0.98/app-0.98.1237
When I get a version I like, I want to symlink it to
ln -s /work/product/versions/app-0.98/app-0.98.1237 /work/product/versions/app-0.98/release
This way, I can always download my validated release by asking for the
release file. I download them like this:
scp me@host01:/work/product/versions/app-0.98/release .
On my local filesystem, I am left with a file named "release".
me@host01:/home/me# ls -al total 528948 drwxr-xr-x 2 me me 4096 Feb 6 12:24 . drwxr-xr-x 8 me me 4096 Feb 2 13:03 .. -rwxr-xr-x 1 me me 541627065 Feb 6 12:25 release
I'd like the file to be named the same as the original file,
app-0.98.1237. Is there something I can change on my server or in my
scp call to save the file using the original file name?
I'm on a variety of OSes, primarily Linux - Debian and CentOS distros.