Hot answers tagged symlink
I don't see any advantage to hard links. With hardlinks, you can move the original file (rename it) as needed without needing to recreate the link. That strikes me as a bug rather than a feature. If you want to disable a site (for example because you've just noticed that it has a major security hole), with symbolic links, you can just rename the ...
No, there is not. If the user has permissions to write the directory that contains the symlink, then they will be able to do the following things: Remove all kinds of files from that directory Create all kinds of files in that directory Rename files within that directory Move files into the directory (assuming they also have write permission on the ...
When you did the ls -il /usr/bin, you were listing file names and matching inode numbers. In this context, it's probably best to think of "file name" as separate from "inode", and to think of the inode as the file. The "inode" is typically an on-disk data structure containing metadata (permissons, ownership, creation time, access time, etc) and the disk ...
Just use: cd -P .. From the bash manpage: The -P option says to use the physical directory structure instead of following symbolic links.
The answer is here thanks to @Mahesh Edit smb.conf [global] unix extensions = no [share] follow symlinks = yes wide links = yes this file happens to be found in /etc/samba/smb.conf.
There are several problems with your script. Missing double quotes around $(readlink …). That will break if the link target contains whitespace or wildcard characters. You're using a command substitution around the ln command, and using the result as a command to run. Fortunately this does no harm since ln produces no output. Your mv command moves the ...
** doesn't follow symlinks since bash-4.3. See CHANGES between bash-4.3-release and bash-4.3-rc2: globstar (**) no longer traverses symbolic links that resolve to directories. This eliminates some duplicate entries.
I use this for my case and it works quite well, as I know the directory to look for broken symlinks: find -L $path -maxdepth 1 -type l and my folder does include a link to /usr/share but it doesn't traverse it. Cross-device links and those that are valid for chroots, etc. are still a pitfall but for my use case it's sufficient.
Only top voted, non community-wiki answers of a minimum length are eligible