Click here to Skip to main content
16,021,041 members
Home / Discussions / Linux Programming
   

Linux Programming

 
Questionhelp me to understand "rfcomm" symbol "->" Pin
jana_hus10-Oct-24 8:38
jana_hus10-Oct-24 8:38 
AnswerRe: help me to understand "rfcomm" symbol "->" Pin
Richard MacCutchan10-Oct-24 22:19
mveRichard MacCutchan10-Oct-24 22:19 
GeneralRe: help me to understand "rfcomm" symbol "->" - modified - more (confusing_) Linux terminology Pin
jana_hus12-Oct-24 16:18
jana_hus12-Oct-24 16:18 
GeneralRe: help me to understand "rfcomm" symbol "->" - modified - more (confusing_) Linux terminology Pin
RichardM202413-Oct-24 2:28
RichardM202413-Oct-24 2:28 
GeneralRe: help me to understand "rfcomm" symbol "->" - modified - more (confusing_) Linux terminology Pin
k505413-Oct-24 3:07
mvek505413-Oct-24 3:07 
Way back, the UNIX filesystem only supported a physical link. So a directory entry might have been
C
 struct dirent {
  unsigned long d_ino;
  char d_name[30];
}; 
So if your directory contained
8539501 foo
8539502 bar
8539503 baz
8539502 paw
Then it should be clear that the files bar, inode=8539502 and paw inode=8539502 are the same file, i.e a Physical (or hard) link. If you list the directory you'll see something like
[k5054@azure foo]$ ls -li
total 0
8539502 -rw-r--r-- 2 k5054 k5064 0 Oct 13 06:31 bar
8539503 -rw-r--r-- 1 k5054 k5064 0 Oct 13 06:31 baz
8539501-rw-r--r-- 1 k5054 k5064 0 Oct 13 06:31 foo
8530502 -rw-r--r-- 2 k5054 k5064 0 Oct 13 06:31 paw
The -i flag to ls add the inode, and so we can see bar and paw have the same inode (8359502). Also, column 3 shows the number of physical links to the inode, which for bar and paw are 2, but foo and baz are only one. Note that a hard link doesn't need to reside in the same directory, you can for example do something like
ln foo/bar/baz ping/pong/paw
, which will create the physical link. There are 2 restrictions to hard links: 1) you can't create a hard link between directories, and 2) you can't create hard links across file systems. Symbolic (soft) links solve both these problems. In the case of a soft link, the link can be thought of as a reference. If we take the above directory and create a soft link between foo and bang via
ln -s foo bang</pre> we now get: <pre>k5054@azure foo]$ ls -li<br />
total 4<br />
8539536 lrwxrwxrwx 1 k5054 k5064 3 Oct 13 06:48 bang -> foo<br />
8539502 -rw-r--r-- 2 k5054 k5064 0 Oct 13 06:31 bar<br />
8539503 -rw-r--r-- 1 k5054 k5064 0 Oct 13 06:31 baz<br />
8539501 -rw-r--r-- 1 k5054 k5064 0 Oct 13 06:31 foo<br />
8539502 -rw-r--r-- 2 k5054 k5064 0 Oct 13 06:31 paw</pre> This shows that the file <code>bang
is a symbolic link (file type "l") which points to "foo". Now "bang" acts as a pointer or an indirection. In order to get to the contents of <bang>, the OS has to open bang, read its contents and then open the file pointed to by the contents. Also, note that the size of bang is 3, ie "foo". Since we now have this indirection, we can link to files in other filesystems, and we can also create links to other directories. You're also not limited to only one indirection. A soft link can point to another soft link, to another soft link, etc.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown

GeneralRe: help me to understand "rfcomm" symbol "->" - modified - more (confusing_) Linux terminology Pin
jana_hus13-Oct-24 5:28
jana_hus13-Oct-24 5:28 
GeneralRe: help me to understand "rfcomm" symbol "->" - modified - more (confusing_) Linux terminology Pin
markkuk7hrs 3mins ago
markkuk7hrs 3mins ago 
QuestionBUMP Will the current / supported /active "Bluetooth" source code - PLEASE stand up ? Pin
jana_hus17-Aug-24 4:16
jana_hus17-Aug-24 4:16 
AnswerRe: current / supported /actoive source code - PLEASE stand up ? Pin
Richard MacCutchan2-Aug-24 22:48
mveRichard MacCutchan2-Aug-24 22:48 
GeneralRe: current / supported /actoive source code - PLEASE stand up ? Pin
MrSuddenJoy14-Aug-24 8:51
MrSuddenJoy14-Aug-24 8:51 
GeneralRe: current / supported /actoive source code - PLEASE stand up ? Pin
Richard MacCutchan14-Aug-24 9:59
mveRichard MacCutchan14-Aug-24 9:59 
AnswerRe: current / supported /actoive source code - PLEASE stand up ? Pin
jschell14-Aug-24 14:04
jschell14-Aug-24 14:04 
GeneralRe: current / supported /actoive source code - PLEASE stand up ? Pin
jana_hus15-Aug-24 9:08
jana_hus15-Aug-24 9:08 
AnswerRe: BUMP Will the current / supported /active "Bluetooth" source code - PLEASE stand up ? Pin
Richard MacCutchan17-Aug-24 4:20
mveRichard MacCutchan17-Aug-24 4:20 
Questionbluetooth "blues"... Pin
jana_hus24-Jul-24 7:16
jana_hus24-Jul-24 7:16 
AnswerRe: bluetooth "blues"... Pin
k505424-Jul-24 7:49
mvek505424-Jul-24 7:49 
GeneralSOLVED Re: bluetooth "blues"... Pin
jana_hus2-Aug-24 11:06
jana_hus2-Aug-24 11:06 
QuestionDAOS Command Fails with "Transport layer mercury error" on CentOS 7.9 Pin
northernlights from Bombay10-Jun-24 11:06
northernlights from Bombay10-Jun-24 11:06 
GeneralRe: DAOS Command Fails with "Transport layer mercury error" on CentOS 7.9 Pin
k505426-Jun-24 5:30
mvek505426-Jun-24 5:30 
Questionrfcomm ? Pin
Salvatore Terress21-May-24 9:37
Salvatore Terress21-May-24 9:37 
AnswerRe: rfcomm ? Pin
jschell21-May-24 12:29
jschell21-May-24 12:29 
GeneralRe: rfcomm ? Pin
Salvatore Terress21-May-24 18:04
Salvatore Terress21-May-24 18:04 
AnswerRe: rfcomm ? Pin
trønderen21-May-24 21:17
trønderen21-May-24 21:17 
GeneralRe: rfcomm ? Pin
Salvatore Terress23-May-24 7:05
Salvatore Terress23-May-24 7:05 
GeneralRe: rfcomm ? Pin
trønderen23-May-24 8:33
trønderen23-May-24 8:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.