Tag Info

New answers tagged

1

My tar implementation is the best method star -cv -f out.tar -find protTests ! -type l


3

You could do this, to supply tar with a list of all files inside protTests except those which are symlinks: find protTests -maxdepth 1 -mindepth 1 -not -type l -print0 | tar --null --files-from - -cvf protTests.tar By the way, your existing command: tar -cvf protTests.tar protTests/* will not archive all files in protTests, it will only archive ...


2

Sure, just use paths to where you want the symlinks to be. Linking to a file called "hi" in b_dir, we would do. [_@blank c_dir]$ ln -s ~/Documents/symlinktest/b_dir/hi ~/Documents/symlinktest/a_dir/hello [_@blank c_dir]$ ls ~/Documents/symlinktest/a_dir/ hello Or, with relative paths, we can do: [_@blank c_dir]$ ln -s ../b_dir/hi ../a_dir/hey


0

you can use : ln -s /A /B Note : /A and /B should be full path if you running from /C.


1

You don't need to be in the directories to create links. Links can be created from anywhere, as long as you know the target and link name. For more information see the man ln or info coreutils 'ln invocation', the latter's initial output is as follows (from CentOS 6.6): File: coreutils.info, Node: ln invocation, Next: mkdir invocation, Prev: link ...


0

The most intuitive way to implement your wish is to use an alias. Type: alias studio=/opt/android-studio/bin/studio.sh or enter a related alias into .profile or better: what your shell uses as $ENV. Note that you still may need to add /opt/android-studio/bin to your PATH to be able to use the software. The best is to first try out whether it works ...


1

Hard links are additional directory entries for the same file. That means All hard links to a file must be on the same file system (because a directory entry cannot point to a file on a different file system), but not necessarily in the same directory. There's no difference between the original directory entry and the new hard link; from the operating ...


5

The command you ran created a symbolic link in the current directory. Judging by the prompt, the current directory is your home directory. Creating symbolic links to executable programs in your home directory is not particularly useful. When you type the name of a program, the shell looks for it in the directories listed in the PATH environment variable. To ...


0

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories) While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet. Think of this, if you "deleted" everything from your ...


3

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 ...


2

Just use: cd -P .. From the bash manpage: The -P option says to use the physical directory structure instead of following symbolic links.


1

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.


1

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.


1

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 ...


0

There's a convenient little utility called symlinks (originally by Mark Lords, now maintained by J. Brandt Buckley), present in many Linux distributions. To convert all the absolute symbolic links in a directory to be relative: symlinks -c /path/to/directory Unfortunately there's no option to convert a single link, you'd have to move it to its own ...


0

It should point to ../SpiderOakHive/config/blender/ instead of SpiderOakHive/config/blender/


2

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 ...


1

** 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.



Top 50 recent answers are included