Go Job Hunting at the LQ Job Marketplace
Go Back > Blogs
User Name



Unix runlevel scripts: Finally the first character makes sense!

Posted 05-29-2010 at 05: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:
~$ 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 2854 Comments 0 bittner is offline

[script] Easy Backup Solution using rsync

Posted 01-03-2010 at 11:03 AM by ~sHyLoCk~
Updated 01-05-2010 at 11: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 3401 Comments 0 ~sHyLoCk~ is offline

Copy directory using tar

Posted 03-03-2009 at 11:04 AM by ciotog
Updated 03-07-2009 at 09: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.


	cat << USAGE
	usage: cpdir <source-dir> <dest-dir>

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


All times are GMT -5. The time now is 03:19 AM.

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