Highlight directories in path with execute permission for others
Hi all, I'm trying to make a script that takes at the most one argument and lists all directories in the path in a special format:
UserGroupOtherFilename
rwx r-- r-x \
rwx r-x r-- home
This is my code as it is right now:
This is what I get when I run my script:
dirpath ~/BTP100
Owner Group Other Filename
----- ----- ----- --------
d r w x r - x r - x /
d r w x r - x r - x home
d r w x - - x - - x drey5
As you can see aren't there as I want them and the directory BTP100 isn't listed. Also, directories that have execute permission for others aren't being highlighted.
There's far more wrong with your script than it not printing in color... Using 'cut' to get a single character, 10 times in a row, is roughly 2,000 times slower than using shell builtins.
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
Hi All,
What is the use of execute permission for a folder.
I know "for execute a file(script file) we have to provide execute permission to that respective file".But what is the use to give execute permission to folder.Is it equal to read permission ?
Regards,
Mastan (1 Reply)
Hello,
I need to install a program from a DVD. It uses a sh script called setup.
root@ragnok: head -2 /media/cdrom0/setup
#!/bin/sh
root@ragnok: ls -l /media/cdrom0/setup
-r-xr-xr-x 1 root root 4688 Nov 8 08:38 /media/cdrom0/setup
root@ragnok: /media/cdrom0/setup
bash:... (2 Replies)
Hi,
I have a shell script(test.sh) and need to give execute permission for this shell script to user group
cobr_sftp and oracle.
Could you please help as to how to give this permission.
I have already given full access(777) to script test.sh. Does this mean all the users/user group can access... (1 Reply)
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
This might be very silly question but i dont know y is it so...
i Have script
I have Given the permissions in the following manner...
-rwxrwx--x 1 root system 3 Jun 08 15:46 temp
I want no one to see what is present in that but should be able to execute it..
but when... (3 Replies)
how can a script run without execute permissions.
when i run myscript as :
sh a.sh
it was working but when i say simple a.sh its not working since it has no x permission.but how about fist case? (1 Reply)
I am logged in as root and am trying to execute a file called x_cleanup_equdata but keep getting the message
ksh: x_cleanup_equdataNEW: 0403-006 Execute permission denied.
I did FTP this file from another server using GET, would this make the difference?
I tried chmod 666 but still no luck. ... (2 Replies)