0

In Mint 17 (Cinnamon), I'm using the file manager (I guess it's called Nemo?) to view some header files after building OpenSSL in the 'include' directory. Each of the header files in this directory has a sub-icon that looks like an arrow, I guess this means it's a symlink or soft link to a real file. I just want to copy/paste all of these header files into another directory, but when I do this I instead get copies of the link itself and not the target files.

How can I copy/paste the actual physical files and not the links, from the links themselves?

EDIT

Here is the result of ls -l:

robert@mint-os ~/third-party-source/openssl/include/openssl $ ls -l
total 1572
lrwxrwxrwx 1 robert robert 22 Jan 23 07:54 aes.h -> ../../crypto/aes/aes.h
lrwxrwxrwx 1 robert robert 24 Jan 23 07:54 asn1.h -> ../../crypto/asn1/asn1.h
lrwxrwxrwx 1 robert robert 28 Jan 23 07:54 asn1_mac.h -> ../../crypto/asn1/asn1_mac.h
lrwxrwxrwx 1 robert robert 25 Jan 23 07:54 asn1t.h -> ../../crypto/asn1/asn1t.h
lrwxrwxrwx 1 robert robert 22 Jan 23 07:54 bio.h -> ../../crypto/bio/bio.h
lrwxrwxrwx 1 robert robert 26 Jan 23 07:54 blowfish.h -> ../../crypto/bf/blowfish.h
<snip>
  • Open Terminal in the 'include' directory and try to check if the files are links really by ls -lL – Costas Jan 23 '15 at 20:24
  • @Costas I've updated my question with the results of the command. – void.pointer Jan 23 '15 at 20:39
  • @Costas I think that command shouldn't include -L, otherwise how would we distinguish between links and their target regular files? – muru Jan 23 '15 at 20:49
  • @muru I've updated my question again with just the results of ls -l. – void.pointer Jan 23 '15 at 20:55
0

From the output, the links are all to ~/third-party-source/openssl/crypto. So either navigate there from the GUI, or with the command line cp, use --dereference:

-L, --dereference
      always follow symbolic links in SOURCE

Like so:

cp -L ~/third-party-source/openssl/include/openssl/* /some/where/else
  • Using cp worked and is what I ended up using, but the answer I'm really looking for is how to do this through the GUI. – void.pointer Jan 23 '15 at 21:31
  • @void.pointer the file browser doesn't have an option to follow links, so what you will have to do is go to the links' target directory and copy. – muru Jan 23 '15 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.