* James D. Parra <Jamesp@MusicReports.com> [02-05-07 15:38]:
How do you remove a softlink without removing the directory it is referencing, just the softlink itself?
rm <soft-link> ~~~ Thanks, I didn't know if 'rm' on a softlink to a dir' would also remove all of it contents. rm -fR <name_dir_softlink> I used 'unlink', just incase. Thanks again, ~James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 05 February 2007 22:00, James D. Parra wrote:
* James D. Parra <Jamesp@MusicReports.com> [02-05-07 15:38]:
How do you remove a softlink without removing the directory it is referencing, just the softlink itself?
rm <soft-link> ~~~
Thanks, I didn't know if 'rm' on a softlink to a dir' would also remove all of it contents.
rm -fR <name_dir_softlink>
-R means "recursive". Why would you use recursive mode if you don't want to recurse? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* James D. Parra <Jamesp@MusicReports.com> [02-05-07 16:03]: [...]
rm -fR <name_dir_softlink>
This is exactly what you said that you did not want to do. 16:04 wahoo:~ > rm --help Usage: /bin/rm [OPTION]... FILE... Remove (unlink) the FILE(s). -d, --directory unlink FILE, even if it is a non-empty directory (super-user only; this works only if your system supports `unlink' for nonempty directories) -f, --force ignore nonexistent files, never prompt -i, --interactive prompt before any removal --no-preserve-root do not treat `/' specially (the default) --preserve-root fail to operate recursively on `/' -r, -R, --recursive remove directories and their contents recursively -v, --verbose explain what is being done --help display this help and exit --version output version information and exit By default, rm does not remove directories. Use the --recursive (-r or -R) option to remove each listed directory, too, along with all of its contents. To remove a file whose name starts with a `-', for example `-foo', use one of these commands: rm -- -foo rm ./-foo Note that if you use rm to remove a file, it is usually possible to recover the contents of that file. If you want more assurance that the contents are truly unrecoverable, consider using shred. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 OpenSUSE Linux http://en.opensuse.org/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Anders Johansson
-
James D. Parra
-
Patrick Shanahan