LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Unix runlevel scripts: Finally the first character makes sense!

Posted 05-29-2010 at 04:12 PM by bittner (Notes on Linux)

You probably know Unix runlevel scripts. They start with an S or a K, and they are typically located at /etc/rcX.d/ with X being the runlevel (0-6) the script is supposed to run at. For example:
Code:
~$ ls -l /etc/rc5.d/*cups
lrwxrwxrwx 1 root root 14 2009-12-31 16:35 /etc/rc5.d/S50cups -> ../init.d/cups
To be precise those S- and K- files are typically symbolic links to scripts that reside in /etc/init.d/, and from my experience I felt they work as follows:
  • Any symlink
...
LQ Newbie
Posted in Uncategorized
Views 2576 Comments 0 bittner is offline
Old

[script] Easy Backup Solution using rsync

Posted 01-03-2010 at 10:03 AM by ~sHyLoCk~
Updated 01-05-2010 at 10:14 PM by ~sHyLoCk~

Originally Posted in my Blog.

I will be writing this guide as a part of my upcoming "Arch System Maintenance Guide". When you are using Linux, you should always take regular backups. It is secure, it is stable and all that, but backup is very important to aid you in case you make a mess of your system. I will be writing the script to backup the entire system, excluding a few folders/files,etc. So here...
Senior Member
Posted in Scripts
Views 2930 Comments 0 ~sHyLoCk~ is offline
Old

Copy directory using tar

Posted 03-03-2009 at 10:04 AM by ciotog
Updated 03-07-2009 at 08:40 AM by ciotog (remove stray echo, no need to test before mkdir when using -p)

Here's a simple script that uses tar to copy a directory. Naturally it would need to be called cpdir (or alter the usage method) and present in your path to use it.

Code:
#!/bin/sh

usage()
{
	cat << USAGE
	usage: cpdir <source-dir> <dest-dir>
USAGE
}

if [ -z "$1" -o -z "$2" -o ! -d "$1" -o -e "$2" -a ! -d "$2" ]
then
	usage
	exit 1
...
Member
Posted in scripts
Views 3520 Comments 0 ciotog is offline

  



All times are GMT -5. The time now is 06:57 AM.

Main Menu

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration