I want to replace the files in /lib with links pointing to the same files in a mounted Squash file.
I have a for loop that does this, but it seems that find should do it without the loop.
This is the command:
Code:
find /lib -type f -exec ln -s /mnt/sq/{} {} ;
I made this command to test it:
Code:
find /lib -type f -exec echo /mnt/sq/{} {} ;
It should show the arguments to "ln -s".
But I get the error... find: missing argument to `-exec'
I tried escaping the {} like this: \{} and this: \{\} , but no go.
NOTE: I wanted to replace the whole /lib dir. with a link, but "ln -s" won`t do it.
I renamed /lib to /lib_ and make a link to it /lib -> /lib_
Then when the Squash file`s mounted a new link can be made over the top of the old one.
But it doesn`t work, the /lib link still points to /lib_, and "ln -s" error code is 0 !!! ( no error...)