ls switch to view octal permissions??


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ls switch to view octal permissions??
# 1  
Old 09-18-2009
ls switch to view octal permissions??

Is there seriously not an easy way to do this? you really need a script for it? that is ridiculous! Please someone tell me there is an ls switch to view octal permissions instead of rwx i want 777.
# 2  
Old 09-18-2009
ls command cannot do as far as i know, but somebody may come with a better solution.

stat command will show permissions in octal format, try it out.

Code:
stat unix.com 
  File: `unix.com'
  Size: 0             Blocks: 0          IO Block: 4096   regular empty file
Device: 805h/2053d    Inode: 1145242     Links: 1
Access: (0600/-rw-------)  Uid: ( 1000/ sathiya)   Gid: ( 1000/ sathiya)
Access: 2009-09-18 21:24:59.000000000 +0530
Modify: 2009-09-18 21:24:58.000000000 +0530
Change: 2009-09-18 21:24:58.000000000 +0530

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

Moving from Desktop View to Mobile View

See attached video for a demo on how to move back and forth from the desktop view to the mobile view. Currently this only works for the home page, but I will work on some new PHP code in the future to make this work with the page we are currently on. Edit: The issue with making every page ... (2 Replies)
Discussion started by: Neo
2 Replies

2. Shell Programming and Scripting

Problem with gstat and octal value

Here are a few lines from my script. The problem I am having is that the statement for gstat returns this error: line 43: The statement is coming from gstat. Is there a way to fix it? Apparently -eq 02 is coming up as some octal value, I need it to be recognized as 02. Apparently in... (4 Replies)
Discussion started by: newbie2010
4 Replies

3. Shell Programming and Scripting

syntax for IF test or AWK for octal

Using korn shell. I am reading a file line by line. If a record has a carriage return (octal 015) then I append the second record to the first record. Not all records have a carriage return. I have the unix shell script working with grep, but when my file has +100,000 records it runs slow. I would... (3 Replies)
Discussion started by: sboxtops
3 Replies

4. UNIX for Dummies Questions & Answers

Deleting octal values

I have some junk values in my files 鵶„‰¼±¤¡ad. am able to find the octal values as below by using od command. 303 251 265 266 204 211 274 261 244 241 141 144 i want to know how to delete the octal this values . (5 Replies)
Discussion started by: vino.paal
5 Replies

5. Homework & Coursework Questions

Problem with simple octal to decimal code

Hello all I started computer science and C++ programming only 6 weeks ago with no prior knowledge. It's a great language, the only other one apart from English that I hope to speak fluently quite soon. I look forward to participating further on these forums, seeking answers and looking at previous... (3 Replies)
Discussion started by: qf_woodfox
3 Replies

6. Shell Programming and Scripting

Command to return permissions in octal format

Is there any command that would return the permissions of a file or folder in octal format (e.g. 755, 644, etc.) Thanks (4 Replies)
Discussion started by: pcwiz
4 Replies

7. Shell Programming and Scripting

[bash]printf octal instead of decimal

Hello everybody, I would like to understand why the printf function is returning me an octal value with this command : printf %4.4d 0010 returns 0008 printf %4.4d 10 returns 0010 Thanks for help. (3 Replies)
Discussion started by: dolphin06
3 Replies

8. UNIX for Dummies Questions & Answers

Display permissions in octal format

Hi, Is there any way to display the permissions in octal format rather than "rwxrwxrwx" format. I have a file and i want to see the permissions in octal format. Please help. (11 Replies)
Discussion started by: venkatesht
11 Replies

9. Programming

octal and strings

hi i have a peculiar problem...i have a number of stirngs separated by a '/0'. it looks somethings like: char test="abk\0jsdhj\01234\0" actually i will be reading this from a file or something... im supposed to change the \0 to a ',' but in C the octal representation starts with a '\'...... (1 Reply)
Discussion started by: strider
1 Replies

10. UNIX for Dummies Questions & Answers

view user permissions on directory

Hello, and thanks in advance- I just installled red hat and pinged my machine and got a reply. When i go to http://myIPhere from my other machine it asks for a password and username. It doesnt accepts the username and passwords I use to login to my linux box. I therefore think its a premissions... (1 Reply)
Discussion started by: 99miles
1 Replies
Login or Register to Ask a Question