View Full Version : Symlink
b1hgaa88
02-22-2002, 07:12 PM
Can someone please tell me what I did here? I wanted to find out whether I had the program "Symlink" on my system (MacOS 10.1.3) and I did a find command (obviously incorrectly) in the Terminal as follows:
find / "symlink"
This flashed ALL the files on my HD on the screen (went on for a number of minutes until I stopped the process).
What actually did I do here? Did I just make a list of my files/folders or did I do something more sinister?
Any ideas?
Thanks
mervTormel
02-22-2002, 07:58 PM
no, nothing sinister, but nothing very useful either.
% find / "symlink"
says find everything, it pretty much doesn't understand the quoted string out there and ignores it.
find is a quixotic little (big) piece of work with some very quiky input switches and args, but you'll get used to it.
what you want to say is something like
find [start looking here] -andItsNameIs "this":
% find / -name "Symlink"
telling find to start looking at "/" and traverse the enitire hierarchy of every directory looking for a file named exactly "Symlink"
you'll get something like this:
% find / -name "Symlink"
find: /.Trashes: Permission denied
find: /private/var/cron: Permission denied
find: /private/var/db/dhcpclient: Permission denied
find: /private/var/db/netinfo/local.nidb: Permission denied
find: /private/var/root/.Trash: Permission denied
...
still, not very useful. if you have a file named "Symlink", it would pop up there somewhere. try that on a known file name in your home dir. my guess is that you don't have that file named in the filesystem. if i'm mind reading wrong, just disregard, and read % man find
are you really looking for information about UNIX symbolic links? try:
% man ln
b1hgaa88
02-23-2002, 08:40 AM
Thanks for the info. Apparently there is a UNIX program out there called "Symlinks" that will list all the symbolic links you have on your system and I wondered whether I had this already. That's all I wanted to do (and, as you suspect, I do not have this on my system).
Thought it might be a useful tool.
mervTormel
02-23-2002, 10:34 AM
this command will find symbolic links, starting at your current working directory:
% find . -type l
there is a debian package called symlinks
http://packages.debian.org/unstable/utils/symlinks.html
it needs some porting work for OSX.
b1hgaa88
02-23-2002, 11:13 PM
Many thanks. I think I'll just stick to the command. Seems to work well.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.