LinuxQuestions.org
Register a domain and help support LQ
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 11-23-2008, 05:07 PM   #1
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Rep: Reputation: 30
what does "c" mean for "ls -l" command output?


When I enter in the "ls -l" command, sometimes I see a "c" in front of an option. What does this "c" mean? I know that a "d" means a directory, but what does a "c" stand for?
 
Old 11-23-2008, 05:12 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
See http://www.comptechdoc.org/os/linux/..._ugfilesp.html
 
Old 11-23-2008, 05:15 PM   #3
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
so it is character unbuffered device file

Quote:
c= character (unbuffered) device file special
Thanks, so it is a character unbuffered device file.

What are those used for, and if I delete it is it going to mess things up?
 
Old 11-23-2008, 05:21 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What's the file? I'd guess it'e in /dev or somewhere. Why do you want to delete it?
 
Old 11-23-2008, 05:25 PM   #5
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Some character devices are created by certain hardware on your computer.
The Terminal sessions you open utilize character devices ... you sound card, pseudo TTY's used for Telnet ... etc.

Some devices in /dev are automatically created by udev, so they will appear again at bootup. Some devices are left over from legacy hardware.

You will really have to know what nodes are really required and which are not ... though this is not an easy thing to figure out.
 
Old 11-23-2008, 05:30 PM   #6
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
Quote:
Why do you want to delete it?
If it something that I don't need, then it would not matter if I delete it? I was cleaning up some files that are old or not needed.
 
Old 11-23-2008, 05:47 PM   #7
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No it wouldn't. But given the space it occupies, and the risk of getting it wrong (ie actually needing it), why would you?
 
Old 11-23-2008, 06:00 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
If you are in system folders, I would be a bit careful about "cleaning up". Keep in mind that in Unix/Linux and similar systems: "Everything is file". But some of those "files" are really not files the way you might be used to seeing them.

If you don't know what something does, don't delete it.
 
Old 11-24-2008, 12:57 AM   #9
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Quote:
Originally Posted by newtovanilla View Post
If it something that I don't need, then it would not matter if I delete it? I was cleaning up some files that are old or not needed.
If you have to ask what a block or charater device file is, you shouldn't be in /dev.
Sorry if that sounds harsh, but those files allow direct access to almost all your hardware. You can really screw up badly in there. You could... oh for example... wipe a hd partion by writing to the wrong file. The files themselves take up very little space, iirc less than a dozen or two dozen bytes each, don't recall precisely. And if you system is using udev then you need them _all_, because when you boot up only the ones you need are created each time you boot.
 
Old 11-24-2008, 11:40 AM   #10
salter
Member
 
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
Avoid cleanups in areas outside of the /home, /usr/local, and /media directories. All other places hold files necessary for something or required by something - it's easier to let them alone, then to restore your system after an unlucky cleanup situation.

Last edited by Tinkster; 10-30-2010 at 05:13 PM.
 
Old 11-24-2008, 12:12 PM   #11
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
Originally Posted by dxqcanada View Post
Some character devices are created by certain hardware on your computer.
The Terminal sessions you open utilize character devices ... you sound card, pseudo TTY's used for Telnet ... etc.
Strictly speaking, the hardware doesn't create anything. Some nodes are static (you can create as many as you wish by hand), but most of them are created by udev. Yes, they are created when you plug hardware, but it's not the hardware which creates them, but udev.

In the past a number of systems have been used to manage this, however with the deprecation of devfs most distros nowadays use udev to automate all this stuff.



Quote:
Originally Posted by kevinalm View Post
If you have to ask what a block or charater device file is, you shouldn't be in /dev.
Sorry if that sounds harsh, but those files allow direct access to almost all your hardware. You can really screw up badly in there. You could... oh for example... wipe a hd partion by writing to the wrong file. The files themselves take up very little space, iirc less than a dozen or two dozen bytes each, don't recall precisely. And if you system is using udev then you need them _all_, because when you boot up only the ones you need are created each time you boot.
Ditto. A person that has to ask what a character device node is obviously is not prepared to say if a given node is needed or not. It's not harsh, it's just obvious.

Deleting a device node can render your system unusable, and will require a reinstall unless you know exactly what you are doing (and it that case you wouldn't have harmed your system in first place). But there are worse things that can happen if you write into a device node (i.e. like losing all your data, irreversibly). On defective hardware even worse things could happen, though that would be getting a bit paranoid.
 
Old 11-24-2008, 12:39 PM   #12
geek_man
Member
 
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Rep: Reputation: 15
The c means that the entry is a character special file. Try to answer your questions by first looking at the man pages.
 
Old 11-24-2008, 01:55 PM   #13
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by geek_man View Post
The c means that the entry is a character special file. Try to answer your questions by first looking at the man pages.
I'd be interested to know which man page to look at though. Any suggestions?
 
Old 11-24-2008, 02:10 PM   #14
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Code:
info ls
The man pages for coreutils seems not to get much love nowadays. The info page has the info you are looking for, on the place where it talks about the -l option. Right now I can't be more concrete.
 
Old 11-24-2008, 07:37 PM   #15
geek_man
Member
 
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Rep: Reputation: 15
Quote:
I'd be interested to know which man page to look at though. Any suggestions?
In Solaris 10 when you type man ls you can find what the c means.
 
  


Reply

Tags
ls


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Courious "unknown" entries in "netstat" output Sheridan Linux - Networking 5 09-01-2009 09:09 AM
Feeding the output of "diff" or "cat" command to dpkg --purge kushalkoolwal Debian 9 06-19-2008 07:27 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM


All times are GMT -5. The time now is 09:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration