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 09-24-2014, 03:19 PM   #1
Arbutus99
LQ Newbie
 
Registered: Sep 2014
Distribution: Debian Wheezy
Posts: 3

Rep: Reputation: Disabled
Question Directory listing - what do the attribute fields refer to?


Using ls -l on /dev I see that some devices (files) have a different attribute pattern than most other directories and files.

I have several video devices installed, /dev/video0 for example.

ls -l shows:

crw-rw---T+ 1 root root video .... video0 etc

other devices show:

brw-rw---T 1 root root disk .... loop1

What do the b, c, T and T+ attributes mean?

Is there a simple way to test for the existence of a specific device or CLASS of devices? In my case I use a bash script to wake up a camera for a period of time and ftp the images in a long loop, but it would be more elegant to test if the camera is actually plugged in, before trying enter the working loop.

Debian 2014.09.09 on Raspberry Pi
 
Old 09-24-2014, 03:27 PM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,159
Blog Entries: 10

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Type field: The first character in the field indicates a file type of one of the following:

Code:
    d = directory
    l = symbolic link
    s = socket
    p = named pipe
    - = regular file
    c= character (unbuffered) device file special
    b=block (buffered) device file special
says http://www.comptechdoc.org/os/linux/..._ugfilesp.html
 
1 members found this post helpful.
Old 09-24-2014, 03:35 PM   #3
Arbutus99
LQ Newbie
 
Registered: Sep 2014
Distribution: Debian Wheezy
Posts: 3

Original Poster
Rep: Reputation: Disabled
Mystery solved !

Thank you!

And the link you included is en excellent reference. Much appreciated !
 
Old 09-24-2014, 03:37 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
The + is that the file has an ACL attached.
If the file doesn't have an ACL attached it shows a ".".
When blank, the filesystem is either mounted with ACLs disabled, or doesn't support ACLs.

I don't see a "T+" on any of my device files.
 
1 members found this post helpful.
Old 09-24-2014, 03:54 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
T means the sticky bit is set, but the execute bit is not:
http://askubuntu.com/questions/88391...ix-permissions
 
  


Reply


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
directory attribute caching for NFS/GlusterFS James259 Linux - Server 4 09-23-2010 10:10 AM
[SOLVED] RHEL5 Apache Directory Listing for a directory thorinn Red Hat 8 02-02-2010 10:01 AM
What does 'total' in the long listing(ls -l) refer to ? Sugarboy Linux - Newbie 3 08-07-2008 03:00 AM
directory attribute - protect from deleting? dfodor Linux - Newbie 3 01-03-2008 07:07 PM
remove read only attribute in user's directory dsholden Linux - Newbie 5 09-14-2005 06:10 PM


All times are GMT -5. The time now is 04:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration