Ryan_R
asked on
BASH (Linux) - View file permission
Making a simple script
I know how to change file permissions - but how do I view them (what command)?
Thanks
I know how to change file permissions - but how do I view them (what command)?
Thanks
ASKER
Hi hongjun
I'm using that command already to view file statistics (I think).
Assuming I haven't got my wires crossed, does that command show both file statistics and permissions?
Thanks
I'm using that command already to view file statistics (I think).
Assuming I haven't got my wires crossed, does that command show both file statistics and permissions?
Thanks
ASKER
Just checked:
I did have the code for the permissions - it turns out that I needed to view File Statistics
Sorry to mislead you on that one
I did have the code for the permissions - it turns out that I needed to view File Statistics
Sorry to mislead you on that one
What type of stats do you want?
ASKER
I would imagine that the stats include items that you see when you r/click a file in Windows and choose Properties
Or if you show a folder in the 'Details' view
This would show you stuff like File Size, Date Modified, etc
However - I only want it to show these stats for the one file ($strFilename) - and not list the whole directory contents. Is this possible?
Thanks (increasing points a bit)
Or if you show a folder in the 'Details' view
This would show you stuff like File Size, Date Modified, etc
However - I only want it to show these stats for the one file ($strFilename) - and not list the whole directory contents. Is this possible?
Thanks (increasing points a bit)
ASKER
Perhaps the wc command will help - I'm unsure of it's extensions though
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
File size
echo $(wc -c <FILENAME)
echo $(wc -c <FILENAME)
ASKER
Thanks hongjun
As it turns out, using stat FILE provides what I need.
As it turns out, using stat FILE provides what I need.
This will show the permissions