LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-07-2004, 06:28 PM   #1
name_in_use450
Member
 
Registered: Jun 2004
Location: United States
Distribution: slackware 10.0 mostly; used many
Posts: 109

Rep: Reputation: 15
links?


Can someone please show me how links work? As in diff between hard and soft, commands used, and when to use them as opposed to an alias.

thanks.
 
Old 06-07-2004, 07:05 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
symlinks or soft links, are used to make either a file appear to be somwhere its not, or have a diffrent name. The command to create them is ln -s. softlinks are basically like shortcuts, and are files that simply point somewhere else.

Hard links are very rarely used, but actually point to a files inode data. All normal files are hardlinks. When you add a hardlink, the files inode structure increments a counter. so the file won't actually be deleted untill both hard links are removed. ln without the -s will create hardlinks.

alias is used primarily for altering the way commands behave by giving them options, or creating variations of commands. i.e

alias ls='ls --color=auto'
alias ll='ls -l'

so when you type ls you actually get ls --color-auto, and ll gets ls --color=auto -l.

It shouldn't be used like a link at all.

Last edited by leonscape; 06-07-2004 at 07:07 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Preserving number of links with 'cp'. ( preserve number of links ) Devyn Linux - General 7 09-16-2005 10:07 PM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 12:10 PM
Sym links and hard links akudewan Linux - Newbie 4 02-09-2005 05:08 AM
how to change relitive links to specific links? wolfe2554 Linux - General 4 07-03-2004 12:40 AM
Links Section updated - Please add your Linux links. jeremy Linux - General 2 11-24-2001 11:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration