[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 290
  • Last Modified:

Quick Unix Commands

Hi,

I need to have  a Unix command set (Single line commands) which can save my time when I am dealing with bunch or batch of items. Few examples of my reqmt is as follows.

1) Changing the permissions for a all dirs&fiels for whole dir structure  (including sub folders)
2) Changing the ownerships for a all  dirs&fiels for whole dir structure
3) Status query commands over network


Apart from the above I am looking for any kind of common tips and shortcuts which can save my time.

One more thing is that the command set should be independent of the Unix flavor.

Requesting everyone to share the links, docs, pdfs for the above.

Thanks
Rishi

0
RishiBang
Asked:
RishiBang
4 Solutions
 
geowrianCommented:
1) chmod -R <mode> <file/directory>
Example: chmod -R 755 /home/guest/
http://en.wikipedia.org/wiki/Chmod for full usage

2) chown -R [user[:group]] <file/directory>
Example: chown -R geowrian:users /home/guest
http://en.wikipedia.org/wiki/Chown for full usage

3) What type of stuff are you looking to query?
0
 
woolmilkporcCommented:
1), 2): find

Issue 'man find' to learn more.

e.g.

find /dir -name "file*" -exec chmod 755 {} \;

3) Use ssh or (not so secure) rsh:

ssh user@hostname any_command

wmp
0
 
woolmilkporcCommented:
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
RishiBangAuthor Commented:
Hi wmpgeowrian,

Thanks for the useful information.
geowrian for your question (3) I need to regularly query for network statistics like about severs availability, network strength, remote port status, NFS disk params....etc

Thanks,
Rishi
0
 
woolmilkporcCommented:
Consider using a monitoring tool like NAGIOS -
www.nagios.org
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now