LinuxQuestions.org
Help answer threads with 0 replies.
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, 04:55 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 451

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, 06:39 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 272Reputation: 272Reputation: 272
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, 06:47 PM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,168
Blog Entries: 10

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
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, 06:48 PM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,653

Rep: Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569
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, 07:36 PM   #5
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 451

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, 07:51 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
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, 08:24 PM   #7
ember1205
Member
 
Registered: Oct 2014
Posts: 108

Rep: Reputation: 12
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, 10:46 AM   #8
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,168
Blog Entries: 10

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
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, 12:43 PM   #9
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 451

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:00 PM
is there way to run php scripts without having any server os...... kratosal Linux - Newbie 5 04-06-2008 03:30 PM
Server shutdown using scripts jeesun Linux - Enterprise 5 09-03-2007 04:27 AM
Hiding Server Side Scripts TomalakBORG Linux - Enterprise 3 07-26-2005 03:47 PM
Shell Server Project Scripts blueCow Linux - General 8 04-12-2005 09:08 PM


All times are GMT -5. The time now is 12:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration