Skip to content
Advertisement

Linux bash script symlink with spaces

I am trying to make a script which will find all the folders and files within a given hard drive. then i want to make the symlinks to another folder. However the ln command fails if the folder or file contains space, can someone help me to modify the ln -sf $MOVIE_FILE_LINKS -t $MOVIES_LIB command to make the folders with spaces work? Thanks

JavaScript

Advertisement

Answer

You can try to use find‘s -exec action:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement