If you're new to the Unix or Linux command line, I just want you to know:
Me and all my colleagues with years of experience
Still get confused between `ln -s` and `ln` daily.
Radio Free Trumpistan likes this.
reshared this
If you're new to the Unix or Linux command line, I just want you to know:
Me and all my colleagues with years of experience
Still get confused between `ln -s` and `ln` daily.
Radio Free Trumpistan likes this.
reshared this
lemgandi
in reply to nixCraft π§ • • •Donut Man β
in reply to nixCraft π§ • • •grefeng
in reply to nixCraft π§ • • •Naaaa, it's quite easy, if I may:
Use -s if you want a symbolic link (else use nothing),
and the order is always <from> <to>
So, some kind of spell to use:
link (ln) symbolic (-s) from to
or for hard links
link (ln) from to
After a few times you never forget this again.
Bonus:
if you want to replace or create a symbolic link (in a script for example), replace -s with -nsf
Easy going π
Be happy and SCNR π
Obot 50549535
in reply to nixCraft π§ • • •This struck me as odd for a few reasons.
1. The main confusion with ln is not the "-s", it's the order of the two names, i.e., does "ln a b" link a to b or b to a?
2. I couldn't get confused about this daily because I don't use it anywhere near daily.
3. Seriously I can't remember ever using ln without the "-s". I do find "ln -s" sometimes handy.
Ertain
in reply to nixCraft π§ • • •F4GRX SΓΒ©bastien
in reply to nixCraft π§ • • •Frboy75
in reply to nixCraft π§ • • •Hans van Schoot
in reply to nixCraft π§ • • •Richard Holloway
in reply to nixCraft π§ • • •Street | Train π·π΄
in reply to nixCraft π§ • • •I have tldr installed and I always use that before ln
bls
in reply to nixCraft π§ • • •Emo Vulcan
in reply to nixCraft π§ • • •Slash909uk
in reply to nixCraft π§ • • •your auntifa liza π΅π· π¦ π¦¦
in reply to nixCraft π§ • • •Mx. Eddie R
in reply to nixCraft π§ • • •alias softlink="ln -s"
alias hardlink-like-i-mean-it="ln"
Prevents errors on my desk.
OCTADE
in reply to nixCraft π§ • • •Ivan Haralamov
in reply to nixCraft π§ • • •rk: itβs hyphen-minus actually
in reply to nixCraft π§ • • •nopil3os
in reply to nixCraft π§ • • •"recursive":
chmod and chown: -R
cp: -r or -R
scp: -r
π€¬π€¬π€¬
Dylan
in reply to nixCraft π§ • • •Andy Hunt
in reply to nixCraft π§ • • •SpaceLifeForm
in reply to nixCraft π§ • • •Simple solution: Always use -s
It is not like you should have to use hardlinks to save filesystem storage space these days.
Galbinus Caeli
in reply to nixCraft π§ • • •Radio Free Trumpistan likes this.
Radio Free Trumpistan reshared this.
Seth Galitzer
in reply to nixCraft π§ • • •Matt Organ
in reply to nixCraft π§ • • •Obligatory XKCD.
tar
xkcdUnus Nemo
in reply to Matt Organ • •@Matt Organ @nixCraft π§
tar -cf archive.tar *
tar -xf archive.tar
or perhaps more useful
tar --help
andrew_meir
in reply to nixCraft π§ • • •Unus Nemo
in reply to nixCraft π§ • •@nixCraft π§
You make hard links and symbolic links daily? π
or where you refering to
ls
versusln
?GarretSidzaka
in reply to nixCraft π§ • • •