Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hot to remove stickybit subdirectory also

Status
Not open for further replies.

chomca

Technical User
Jun 26, 2007
15
IN
Hi

how to remove the stickybit in parent directory and subdirectory.many subdirectorys (recuresive)is their.
To remove stickybit single directory recuresive command is
chmod -tR *
but i need for all sub directory also.

Thanks in advance.
 
Hi there,

I tried to rerun the command you specified above on one of our systems but there seems to be something wrong with the syntax and I myself have never used the -tR option when running chmod ...

However if you'd like to change only directories and subdirectories you might use a little script like e.g.:

---------------------------------
#!/usr/bin/ksh

find ./ -type d > /tmp/dir.out
for items in `cat /tmp/dir.out`
do
chmod -tR $items
done
---------------------------------

But you'll have to be in the directory that subdirecories you want to change when you run this script because of the " find ./ ".

Regards
Thomas
 
I think chmod is seeing your R as an invalid permission flag and ignoring it. Per the command's syntax spec, the -R for recursive needs to come before any permissions flags, like so:

chmod -R -t .

HTH,

Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top