0

I've created a set of symlinks which I can use in BASH with CDPATH: 'desk' which points to my desktop, and 'docs' which points to my documents. I can cd using these symlinks cd docs without problems, however I'd also like to use these symlinks for file operations (cp, mv).

I've read How to copy symlinks to target as normal folders, but that doesn't seem to work for me. For example doing cp -L test.txt docs simply creates a new folder 'docs' and copies the file there. How can I use these symlinks as shorthand for source and destination?

1 Answer 1

1

You can't use the CDPATH environment variable to achieve this, as per the answer here at the Unix & Linux StackExchange site where you have a much better chance of getting good answers to questions related to Unix and Linux.

The answer there though gives some idea of how to circumvent this.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .