I want to make symlinks of all files in a directory EXCEPT the existing symlinks in the directory The 2019 Stack Overflow Developer Survey Results Are InCreate a symbolic link relative to the current directoryFind all symlinks to a directory and change target to another directorySymlink all files in a directory with the entire directory treeFind all dirs/files that have symlinks pointing to them?How do I remove all files from wtihin a certain directory except for a child directory of that directory?Does `ln -sf` overwrite existing files which are only symbolic linksWhy change the current directory to the parent directory of a relative symlink before creating itHow can I copy a directory structure but ignore symlinks?Symlinking all dot-files and -directorieszip command show warnings “name not matched” about symlinks, outside of my working directory, pointing to non-existing target

What information about me do stores get via my credit card?

How to charge AirPods to keep battery healthy?

Kerning for subscripts of sigma?

Did any laptop computers have a built-in 5 1/4 inch floppy drive?

Can withdrawing asylum be illegal?

Why “相同意思的词” is called “同义词” instead of "同意词"?

Does HR tell a hiring manager about salary negotiations?

Is an up-to-date browser secure on an out-of-date OS?

How did passengers keep warm on sail ships?

Can a flute soloist sit?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Why can't devices on different VLANs, but on the same subnet, communicate?

Is Cinnamon a desktop environment or a window manager? (Or both?)

Match Roman Numerals

How can I define good in a religion that claims no moral authority?

What is the meaning of Triage in Cybersec world?

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Can you cast a spell on someone in the Ethereal Plane, if you are on the Material Plane and have the True Seeing spell active?

How do I free up internal storage if I don't have any apps downloaded?

How do you keep chess fun when your opponent constantly beats you?

Can there be female White Walkers?

How to display lines in a file like ls displays files in a directory?

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?



I want to make symlinks of all files in a directory EXCEPT the existing symlinks in the directory



The 2019 Stack Overflow Developer Survey Results Are InCreate a symbolic link relative to the current directoryFind all symlinks to a directory and change target to another directorySymlink all files in a directory with the entire directory treeFind all dirs/files that have symlinks pointing to them?How do I remove all files from wtihin a certain directory except for a child directory of that directory?Does `ln -sf` overwrite existing files which are only symbolic linksWhy change the current directory to the parent directory of a relative symlink before creating itHow can I copy a directory structure but ignore symlinks?Symlinking all dot-files and -directorieszip command show warnings “name not matched” about symlinks, outside of my working directory, pointing to non-existing target



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a bash script that creates symlinks from the directories in one users directory to another users directory. I want the script to exclude existing symlinks in the source directory when creating symlinks.










share|improve this question







New contributor




David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Looks like you're reinventing stow

    – muru
    Apr 8 at 10:08











  • Thanks, I am not familiar with stow, is that similar to "install"? Also, I am on MacOs, so stow is not available for me right now. I will check it out.

    – David Norden
    Apr 8 at 10:24











  • stow is much more. It's used for managing symlinks to files from one directory to another. Lets you add, update, remove groups of symlinks. It's available via homebrew.

    – muru
    Apr 8 at 10:29











  • Ok, I will try it out, thanks for the tip!

    – David Norden
    Apr 8 at 10:47











  • I think I have to find another approach. Is there a way to find and remove files with a pattern like this (where the pattern is only that there are two underscores in the filename, separated by letters or numbers) file_name_name

    – David Norden
    Apr 8 at 14:48

















0















I have a bash script that creates symlinks from the directories in one users directory to another users directory. I want the script to exclude existing symlinks in the source directory when creating symlinks.










share|improve this question







New contributor




David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Looks like you're reinventing stow

    – muru
    Apr 8 at 10:08











  • Thanks, I am not familiar with stow, is that similar to "install"? Also, I am on MacOs, so stow is not available for me right now. I will check it out.

    – David Norden
    Apr 8 at 10:24











  • stow is much more. It's used for managing symlinks to files from one directory to another. Lets you add, update, remove groups of symlinks. It's available via homebrew.

    – muru
    Apr 8 at 10:29











  • Ok, I will try it out, thanks for the tip!

    – David Norden
    Apr 8 at 10:47











  • I think I have to find another approach. Is there a way to find and remove files with a pattern like this (where the pattern is only that there are two underscores in the filename, separated by letters or numbers) file_name_name

    – David Norden
    Apr 8 at 14:48













0












0








0








I have a bash script that creates symlinks from the directories in one users directory to another users directory. I want the script to exclude existing symlinks in the source directory when creating symlinks.










share|improve this question







New contributor




David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have a bash script that creates symlinks from the directories in one users directory to another users directory. I want the script to exclude existing symlinks in the source directory when creating symlinks.







bash symlink ln






share|improve this question







New contributor




David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Apr 8 at 9:48









David NordenDavid Norden

1




1




New contributor




David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






David Norden is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Looks like you're reinventing stow

    – muru
    Apr 8 at 10:08











  • Thanks, I am not familiar with stow, is that similar to "install"? Also, I am on MacOs, so stow is not available for me right now. I will check it out.

    – David Norden
    Apr 8 at 10:24











  • stow is much more. It's used for managing symlinks to files from one directory to another. Lets you add, update, remove groups of symlinks. It's available via homebrew.

    – muru
    Apr 8 at 10:29











  • Ok, I will try it out, thanks for the tip!

    – David Norden
    Apr 8 at 10:47











  • I think I have to find another approach. Is there a way to find and remove files with a pattern like this (where the pattern is only that there are two underscores in the filename, separated by letters or numbers) file_name_name

    – David Norden
    Apr 8 at 14:48

















  • Looks like you're reinventing stow

    – muru
    Apr 8 at 10:08











  • Thanks, I am not familiar with stow, is that similar to "install"? Also, I am on MacOs, so stow is not available for me right now. I will check it out.

    – David Norden
    Apr 8 at 10:24











  • stow is much more. It's used for managing symlinks to files from one directory to another. Lets you add, update, remove groups of symlinks. It's available via homebrew.

    – muru
    Apr 8 at 10:29











  • Ok, I will try it out, thanks for the tip!

    – David Norden
    Apr 8 at 10:47











  • I think I have to find another approach. Is there a way to find and remove files with a pattern like this (where the pattern is only that there are two underscores in the filename, separated by letters or numbers) file_name_name

    – David Norden
    Apr 8 at 14:48
















Looks like you're reinventing stow

– muru
Apr 8 at 10:08





Looks like you're reinventing stow

– muru
Apr 8 at 10:08













Thanks, I am not familiar with stow, is that similar to "install"? Also, I am on MacOs, so stow is not available for me right now. I will check it out.

– David Norden
Apr 8 at 10:24





Thanks, I am not familiar with stow, is that similar to "install"? Also, I am on MacOs, so stow is not available for me right now. I will check it out.

– David Norden
Apr 8 at 10:24













stow is much more. It's used for managing symlinks to files from one directory to another. Lets you add, update, remove groups of symlinks. It's available via homebrew.

– muru
Apr 8 at 10:29





stow is much more. It's used for managing symlinks to files from one directory to another. Lets you add, update, remove groups of symlinks. It's available via homebrew.

– muru
Apr 8 at 10:29













Ok, I will try it out, thanks for the tip!

– David Norden
Apr 8 at 10:47





Ok, I will try it out, thanks for the tip!

– David Norden
Apr 8 at 10:47













I think I have to find another approach. Is there a way to find and remove files with a pattern like this (where the pattern is only that there are two underscores in the filename, separated by letters or numbers) file_name_name

– David Norden
Apr 8 at 14:48





I think I have to find another approach. Is there a way to find and remove files with a pattern like this (where the pattern is only that there are two underscores in the filename, separated by letters or numbers) file_name_name

– David Norden
Apr 8 at 14:48










1 Answer
1






active

oldest

votes


















0














you can simply use the -L operator.



user@debian:~$ touch file
user@debian:~$ ln -s file link
user@debian:~$ ls -l
total 8
-rw-r--r-- 1 user user 0 avril 8 12:01 file
lrwxrwxrwx 1 user user 4 avril 8 12:01 link -> file
user@debian:~$ if [[ -L file ]]; then echo "it's a link"; fi
user@debian:~$ if [[ -L link ]]; then echo "it's a link"; fi
it's a link





share|improve this answer























  • Thanks, but it seems that option is not available on MacOS..

    – David Norden
    Apr 8 at 10:22











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






David Norden is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511193%2fi-want-to-make-symlinks-of-all-files-in-a-directory-except-the-existing-symlinks%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














you can simply use the -L operator.



user@debian:~$ touch file
user@debian:~$ ln -s file link
user@debian:~$ ls -l
total 8
-rw-r--r-- 1 user user 0 avril 8 12:01 file
lrwxrwxrwx 1 user user 4 avril 8 12:01 link -> file
user@debian:~$ if [[ -L file ]]; then echo "it's a link"; fi
user@debian:~$ if [[ -L link ]]; then echo "it's a link"; fi
it's a link





share|improve this answer























  • Thanks, but it seems that option is not available on MacOS..

    – David Norden
    Apr 8 at 10:22















0














you can simply use the -L operator.



user@debian:~$ touch file
user@debian:~$ ln -s file link
user@debian:~$ ls -l
total 8
-rw-r--r-- 1 user user 0 avril 8 12:01 file
lrwxrwxrwx 1 user user 4 avril 8 12:01 link -> file
user@debian:~$ if [[ -L file ]]; then echo "it's a link"; fi
user@debian:~$ if [[ -L link ]]; then echo "it's a link"; fi
it's a link





share|improve this answer























  • Thanks, but it seems that option is not available on MacOS..

    – David Norden
    Apr 8 at 10:22













0












0








0







you can simply use the -L operator.



user@debian:~$ touch file
user@debian:~$ ln -s file link
user@debian:~$ ls -l
total 8
-rw-r--r-- 1 user user 0 avril 8 12:01 file
lrwxrwxrwx 1 user user 4 avril 8 12:01 link -> file
user@debian:~$ if [[ -L file ]]; then echo "it's a link"; fi
user@debian:~$ if [[ -L link ]]; then echo "it's a link"; fi
it's a link





share|improve this answer













you can simply use the -L operator.



user@debian:~$ touch file
user@debian:~$ ln -s file link
user@debian:~$ ls -l
total 8
-rw-r--r-- 1 user user 0 avril 8 12:01 file
lrwxrwxrwx 1 user user 4 avril 8 12:01 link -> file
user@debian:~$ if [[ -L file ]]; then echo "it's a link"; fi
user@debian:~$ if [[ -L link ]]; then echo "it's a link"; fi
it's a link






share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 8 at 10:03









BDRBDR

1115




1115












  • Thanks, but it seems that option is not available on MacOS..

    – David Norden
    Apr 8 at 10:22

















  • Thanks, but it seems that option is not available on MacOS..

    – David Norden
    Apr 8 at 10:22
















Thanks, but it seems that option is not available on MacOS..

– David Norden
Apr 8 at 10:22





Thanks, but it seems that option is not available on MacOS..

– David Norden
Apr 8 at 10:22










David Norden is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















David Norden is a new contributor. Be nice, and check out our Code of Conduct.












David Norden is a new contributor. Be nice, and check out our Code of Conduct.











David Norden is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511193%2fi-want-to-make-symlinks-of-all-files-in-a-directory-except-the-existing-symlinks%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.