Here’s a helpful, practical article explaining the command cp megalink link — what it means, how it works, and common pitfalls to avoid.
Sometimes users want to copy a symbolic link as a link, not copy the target file. By default, cp copies the target file — not the link.
Example:
ln -s /real/file.txt megalink # Create symlink named megalink
cp megalink link # Copies the *target* of megalink to 'link'
If you want to copy the symlink itself (keeping it a symlink), use -d or -P:
cp -d megalink link
cp --link (GNU extension)Some versions of cp (Linux) support --link as an alias for -l: cp megalink link
cp --link original copy # Creates a hard link, no extra disk usage
This is not cp megalink link.
cp (Relevant to “link” Copying)| Option | Effect |
|--------|--------|
| -i | Interactive – ask before overwriting |
| -n | No overwrite – don’t clobber existing files |
| -l | Create hard links instead of copying |
| -s | Create symbolic links instead of copying |
| -u | Update – copy only when source is newer |
| -r or -R | Copy directories recursively | Here’s a helpful, practical article explaining the command
cp with Mega.nz ToolsThe Mega command-line client (megacmd) uses mega- prefixed commands. For example:
mega-get https://mega.nz/file/abc123 myfile.dat
But cp megalink link is not a Mega command — it’s standard cp. If you want to copy the symlink itself
![]() | Call us at +49 7634 9057700 from 08:00 to 13:00 CET |