Xref: utzoo comp.unix.wizards:23597 comp.unix.questions:24967 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!apple!vsi1!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: Hard links vs. Soft links Message-ID: <2866@wyse.wyse.com> Date: 24 Aug 90 02:25:17 GMT References: <1084.26d2a42b@desire.wright.edu> <13646@ulysses.att.com> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Followup-To: comp.unix.wizards Organization: Wyse Technology Lines: 58 In article <13646@ulysses.att.com> swfc@ulysses.att.com (Shu-Wie F Chen) writes: >In article <1084.26d2a42b@desire.wright.edu>, anagram@desire.wright.edu >((For Mongo)) writes: ---deleted discussion of hard links, symbolic links > >On a side note, you might want to alias ll, lf, lg, and lx to 'ls -xxx' >instead of keeping separate binaries. For instance, I have ll aliased ^^^^^^^^^^^^^^^^^ Using links of any sort, as you noted, will not create a copy, so no separate binaries. >to ls -lasF. > As for using aliases for this function, only csh and ksh (if you have it) would be able to do this. By using links pointing to the one file and letting the program determine the function based on the name used to call it, sh users can also have this ability. The particular system in the original post has this ability. My system, ls only recognizes the lc alternate name, so I must use either aliases or a shell script to get the function. For sh users, the following has worked for me: : # emulate XENIX style listing commands # I used the following in case this happened to get run by # csh or ksh, which "remember" the command by its full # path name BASENAME=`basename $0` case $BASENAME in l) # long listing ls -l $* ;; ll) # long listing, BSD(?) style ls -l $* ;; lf) # columns with * and slash ls -CF $* ;; lx) # columns sorted in rows ls -x $* ;; lr) # columns, recursively ls -CR $* ;; la) # columns, all files ls -Ca $* ;; esac Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com