Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7657567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:03:58+00:00 2026-05-31T13:03:58+00:00

How do I copy symbolic links only (and not the file it points to)

  • 0

How do I copy symbolic links only (and not the file it points to) or other files using rsync?

I tried

rsync -uvrl input_dir output_dir

but I need to exclusively copy the symbolic links only ?

any trick using include exclude options?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:03:59+00:00Added an answer on May 31, 2026 at 1:03 pm

    Per this question+answer, you can script this as a pipe. Pipes are an integral part of shell programming and shell scripting.

    find /path/to/files -type l -print | \
      rsync -av --files-from=- /path/to/files user@targethost:/path
    

    What’s going on here?

    The find command starts at /path/to/files and steps recursively through everything “under” that point. The options to find are conditions that limit what gets output by the -print option. In this case, only things of -type l (symbolic link, according to man find) will be printed to find’s “standard output”.

    These files become the “standard input” of the rsync command’s --file-from option.

    Give it a shot. I haven’t actually tested this, but it seems to me that it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I copy a symbolic link (and not the file it points to)
I tried to create a symbolic link in the Python site-packages directory using the
The copy of joomla i'm using is edited by the super administrator to not
I'm really wondering what this code does: scala> import java.nio.file._ import java.nio.file._ scala> Files.copy(Paths.get(),
Using COPY statement of PostgreSQL, we can load data from a text file into
Using c#, how do I copy a symbolic link in Windows Vista,7,2008. When I
copy('https://graph.facebook.com/$fbid/picture?type=large', 'images/$fbid.jpg'); i am using the above code to store the image locally ..
I need to copy hundreds of gigs of random files around on my computer
I want to copy a file from A to B in C#. How do
I copy a file like this: require 'fileutils' FileUtils.copy(source_file, dest_file) I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.