get file permission in 777 format


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting get file permission in 777 format
# 1  
Old 09-22-2011
get file permission in 777 format

Hi All,

Is there any unix(solaris) command to get file permissions in 777 format or do we need to write some script for it?
# 2  
Old 09-22-2011
do u want to execute any file are what?
# 3  
Old 09-22-2011
Code:
 
find . -type f -perm 755

# 4  
Old 09-22-2011
find / -type f -perm 0777
# 5  
Old 09-22-2011
Quote:
Originally Posted by rishav
... command to get file permissions in 777 format or do we need to write some script for it?
You can use stat to get file info
On Linux I use
Code:
# stat -c "%a" file
644

Read man stat for your OS.
# 6  
Old 09-22-2011
Hi,
I just want to print file permission in 777 format...

---------- Post updated at 04:17 PM ---------- Previous update was at 04:15 PM ----------

Quote:
Originally Posted by danmero
You can use stat to get file info
On Linux I use
Code:
# stat -c "%a" file
644

Read man stat for your OS.
Thanks danmero, i want something like this only....
but on my system stat command is not working.. i am on solaris..,
# 7  
Old 09-22-2011
Perhaps you have Perl?
This User Gave Thanks to Scott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

FILESYSTEM not FULL, PERMISSION is 777, but cant write to the server

ANy reasons? FILESYSTEM not FULL, PERMISSION is 777, but cant write to the filesystem? any steps to do? reasons for this? (9 Replies)
Discussion started by: kenshinhimura
9 Replies

2. UNIX for Dummies Questions & Answers

How to create a file with 777 permission.?

Hi Guys, I want to know is there any method to create a file having 777 permission. I am aware of umask, since it is only giving max. 666 permission for files this is not fulfilling my needs. Thanks in advance ---------- Post updated at 12:49 AM ---------- Previous update was at 12:31... (10 Replies)
Discussion started by: sanoop
10 Replies

3. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

4. UNIX for Dummies Questions & Answers

Only allowing chmod 777 for file upload folder

Hey everyone. I have 2 different linux servers (each one is through a different web hosting company). On both servers I have the exact same PHP file upload script that allows users to upload a file or image to the server (everything on both servers is identical). On server #1 the "attachments"... (5 Replies)
Discussion started by: Mr.Canuck
5 Replies

5. Shell Programming and Scripting

set permission on file to 777

Here is the sample code I'm trying to execute. I see that the permission on the file is set to 755 always I want to change it to 777. Please help me with this. code : #!/usr/bin/perl use File::Path qw(make_path remove_tree); my $path = "2010/sam"; make_path($path,{mode=>0777}); ... (1 Reply)
Discussion started by: hansini
1 Replies

6. Solaris

/usr/bin has been changed with 777 permission

Hello Guruz, Relay bad condition :mad: Some has changed the permission to 777 recursively for /usr/bin directory by mistake. Now all the permission looks to be 777 on /usr/bin Hence I am so many system related errors as 1 show below. When I am trying to change the password, I am getting... (5 Replies)
Discussion started by: bullz26
5 Replies

7. Cybersecurity

can another user 777 and existing 777 dirctory?

User usrA creates dirA directory and runs chmod 777 on the directory. Can usrB issue another 777 on dirA? It appears the answer is no even if the usrA and usrB are part of the same group. I know this is a rare scenario but I just ran across it and found out that usrB receives an error when... (4 Replies)
Discussion started by: zlek131
4 Replies

8. UNIX for Dummies Questions & Answers

To convert multi format file to a readable ascii format

Hi I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source . Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies

9. UNIX for Dummies Questions & Answers

Convert UTF8 Format file to ANSI format

:confused: Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on... (9 Replies)
Discussion started by: rajreddy
9 Replies

10. UNIX for Advanced & Expert Users

Convert UTF8 Format file to ANSI format

:) Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on this.........Let me... (1 Reply)
Discussion started by: rajreddy
1 Replies
Login or Register to Ask a Question