I use the tar command as,
tar -cvf protTests.tar protTests/*
to tar
all files inside the folder, protTests
. But this is including the symbolic links inside the folder, which is not a desired one.
Is there a command line option, that will leave out all symlinks?
Best Answer
You could do this, to supply
tar
with a list of all files insideprotTests
except those which are symlinks:By the way, your existing command:
will not archive all files in
protTests
, it will only archive those whose names do not begin with.
(those that are not hidden). The*
glob operator skips files whose names begin with.
by design. The command also has the problem that ifprotTests
has lots of files (more than many thousand), thenprotTests/*
can expand to too many arguments to fit on the command line.A simpler command like this would have neither of those problems: