Tag Info

Hot answers tagged


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


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


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


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


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


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

Only top voted, non community-wiki answers of a minimum length are eligible