LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-30-2014, 03:55 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Rep: Reputation: 29
What should i be getting scripts to do on my server?


hi guys,

i wrote a basic bash script last night that gave me a list of my remote clients...if i selected 1 it opened a rdesktop session to that client.

i then linked it to an alias myrdp which i can type from a command
line to launch my menu....pretty cool

what other things should i be scripting? i just cant think of any other examples...i guess you have to be in a working world example to actually see how things get done...im trying to learn on my own and find it difficult sometimes to apply what im learning in the real
world...also, how do you know the boundary between bash scripting and using a full on language like python or perl? ...if anybody can suggest a project regarding bash scripting for me...i would really appreciate it...i find its best to learn by doing...maybe somebody could start a hands on project forum...is there one on here???
 
Old 10-30-2014, 05:39 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
It is very common for people to write scripts to do their backups. I suggest that you write a script using the rsync command to back up your files.

--------------------
Steve Stites
 
Old 10-30-2014, 05:47 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
tar.gz apache configs + mysql databases.
rsync backups.
a contact lookup (like a phone book)

I got|get some of my best ideas from
http://bashscripts.org/forum/viewfor...02d69269941d49
and
http://www.commandlinefu.com/commands/browse
 
Old 10-30-2014, 05:48 PM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,597

Rep: Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690
Bash scripting

Sounds nice.
Ideas for additional scripts?

What scripts would be of most interest for you will depend on what you like to do with your system, as well as what your system is running and doing.

How about one to detect and report the log files that have been updated in the last 30 minute? You would have to identify the log folders for every application, though the easy ones may all be in /var/log. Useful for troubleshooting after a change or intrusion.

I like to build scripts that use recursion and multithreading to run processes on multiple locations on the local server, and on multiple remote hosts at the same time. Hard to tell if anyone else would find that fun.


I hope this helps get things started.
 
Old 10-30-2014, 06:36 PM   #5
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
Quote:
Originally Posted by jailbait View Post
It is very common for people to write scripts to do their backups. I suggest that you write a script using the rsync command to back up your files.

--------------------
Steve Stites
hey jailbait i have that running already...thanks though

any other ideas...
 
Old 10-30-2014, 06:51 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by sigint-ninja View Post
any other ideas...
Revisit your other same topic thread? Esp. the reporting part, that's always up for improving.
 
Old 10-30-2014, 07:24 PM   #7
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
Anything that you find yourself doing repetitively that involves multiple steps... Perfect candidate for a script.

Downloading and installing patches, backups, and other things along those lines.
 
Old 10-31-2014, 09:46 AM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by ember1205 View Post
Anything that you find yourself doing repetitively that involves multiple steps... Perfect candidate for a script.

Downloading and installing patches, backups, and other things along those lines.
+1.
If I have to type anything more than 3 times a day, I write a script for it.
There is an art to Avoiding Repetitive Tasks.
 
Old 11-03-2014, 11:43 AM   #9
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
Habitual can you please just give me an example? ...please
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Scripts needs to run after restarting the server also emcykm Linux - Newbie 5 05-23-2011 03:00 PM
is there way to run php scripts without having any server os...... kratosal Linux - Newbie 5 04-06-2008 02:30 PM
Server shutdown using scripts jeesun Linux - Enterprise 5 09-03-2007 03:27 AM
Hiding Server Side Scripts TomalakBORG Linux - Enterprise 3 07-26-2005 02:47 PM
Shell Server Project Scripts blueCow Linux - General 8 04-12-2005 08:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration