Linux FAQ's & Manuals
- Linux Scripts
- Debian Install
- Bash For Beginners
- Bugzilla
- Consultants Guide
- GCC Manual
- Linux Command Line Tools
- Gnu Pascal Coding Standards
- Linux Installation Disk
- Labolatorium Linux(PL)
- Budowa systemu Linux(PL)
- Linux Dictionary
- Network Administrators
- Rescue Disk for Linux
- Red Hat Installation
- Red Hat Customization
- Red Hat Getting Started
- Red Hat Security
- Secure & Optimize
- Slackware Manual
- Suse Support
- Suse FAQ
Linux-based robots are tricky to create, but Michael Surran's Robotics class found out it can be done...
IT-Director: Sun's Open-Sourcing of Java: Avoid the Red Herring
The 'big news' was that Sun now plans to bring its reference implementations of the mobile 'editions' of Java (JME CDC and CLDC) to market under open-source licenses...
The Linux Extremist: Linux, Sponsored by "24"
I have picked up on a small detail which provides a subliminal reason why I love this programme; it seems that Open Source is rife throughout the programme, to the point that it could be considered a long advertisement for it...
InfoWorld: Who are the Losers, Now That Open Source is Winning?
I'm kidding, but my 80s mentality has me wondering: with all the open source momentum (and it is real), who is losing...?
LWN: X.org, Distributors, and Proprietary Modules
One of the developments merged into 7.1 was the AIGLX project, dedicated to the important goal of providing better eye candy for Linux users worldwide...
8.4. exercises
these exercises are practical applications of the constructs discussed in this chapter. when writing the scripts, you may test by using a test directory that does not contain too much data. write each step, then test that portion of code, rather than writing everything at once.
write a script that asks for the user's age. if it is equal to or higher than 16, print a message saying that this user is allowed to drink alcohol. if the user's age is below 16, print a message telling the user how many years he or she has to wait before legally being allowed to drink.
as an extra, calculate how much beer an 18+ user has drunk statistically (100 liters/year) and print this information for the user.
write a script that takes one file as an argument. use a here document that presents the user with a couple of choices for compressing the file. possible choices could be gzip, bzip2, compress and zip.
write a script called homebackup that automates tar so the person executing the script always uses the desired options (cvp) and backup destination directory (/var/backups) to make a backup of his or her home directory. implement the following features:
test for the number of arguments. the script should run without arguments. if any arguments are present, exit after printing a usage message.
determine whether the backups directory has enough free space to hold the backup.
ask the user whether a full or an incremental backup is wanted. if the user does not have a full backup file yet, print a message that a full backup will be taken. in case of an incremental backup, only do this if the full backup is not older than a week.
compress the backup using any compression tool. inform the user that the script is doing this, because it might take some time, during which the user might start worrying if no output appears on the screen.
print a message informing the user about the size of the compressed backup.
see info tar or introduction to linux, chapter 9: "preparing your data" for background information.
write a script called simple-useradd.sh that adds a local user to the system. this script should:
take only one argument, or else exit after printing a usage message.
check /etc/passwd and decide on the first free user id. print a message containing this id.
create a private group for this user, checking the /etc/group file. print a message containing the group id.
gather information from the operator user: a comment describing this user, choice from a list of shells (test for acceptability, else exit printing a message), expiration date for this account, extra groups of which the new user should be a member.
with the obtained information, add a line to /etc/passwd, /etc/group and /etc/shadow; create the user's home directory (with correct permissions!); add the user to the desired secondary groups.
set the password for this user to a default known string.
rewrite the script from section 7.2.1.4 so that it reads input from the user instead of taking it from the first argument.