LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 11-18-2004, 07:07 AM   #1
augustus123
LQ Newbie
 
Registered: Nov 2004
Location: kolakaran pettai
Posts: 7

Rep: Reputation: 0
what is a socket file??


Hi all,

I was new to Linux...

I was not able to understand :

what is a socket file & symbolic links file?

what's the purpose of these 2 files?

Thanks
Augustus
 
Old 11-18-2004, 07:22 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
a symbolic link is pretty much a "shortcut" like in windows, but unlike windows, these are real genuine parts of a vaild filesystem, not a silly little ".lnk" file.it let's you access a single file from multiple locations. another kind of link that you can make with the "ln" command is a hard link. a hard link is where there are actually two entries in a file systems FAT table which go to the same memory location, as opposed to a symlink where one file points to another. with a hard link you can actually delete the original file, but as other links will remain, it is still available elsewhere. very handy

a socket file is used to pass information between applications amongst other applications. you may already be familiar with a pipe, "|" which lets you feed information directly, e.g. "ls | wc". Here, wc will count the number of lines from the output of ls. now a socket file is used when you can't join these two directly, and instead send the data to a special file. try this:
Code:
mkfifo /tmp/testfifo
tail -f /tmp/testfifo
and in another console
Code:
echo HELLO! > /tmp/testfifo
the tail command should say HELLO! to you. Think of it kinda like a wormhole or something. again useful when you really need to do it.
 
Old 11-18-2004, 07:43 AM   #3
augustus123
LQ Newbie
 
Registered: Nov 2004
Location: kolakaran pettai
Posts: 7

Original Poster
Rep: Reputation: 0
Thats great...
Thank You very much
 
Old 12-06-2004, 10:41 PM   #4
GinEric
Member
 
Registered: Nov 2004
Location: Earth
Distribution: Slackware 10, et ux
Posts: 36

Rep: Reputation: 15
mkfifo creates a file of type "pipe" now, how do you create a file of type "socket"

btw, KDE's dangerous "change file type" changes all files associated not with the ending, or any thing else, but it changes all of the types on the entire machine!

This kde command needs fixin, bad!
 
  


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
how can I create a socket file? enigma82 Linux - Software 8 06-28-2011 08:59 PM
How to operate socket with file interface wangjinyi Programming 4 11-27-2005 11:31 PM
Redirecting socket output to a file elmafiacs Programming 1 10-15-2005 05:18 AM
Socket File Descriptors for a process MadCoder77 Linux - Networking 0 05-26-2005 04:19 PM
Unix socket programming - how to sent a file Scrag Programming 9 03-28-2004 09:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 06:51 PM.

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