Write a shell script will compress (using tar) ALL user directories (in /home) and save the backups in a rotated fashion in a predefined directory.
a. You should use three backup files for rotation and they should be named using numbers in the following format: ..tar.gz. So for the student user account, there should be three files [url removed, login to view], [url removed, login to view], & [url removed, login to view] with 3 being the oldest and 1 being the newest.
b. Your script should back up the directory of interest, preserving permissions and using gzip compression (add the –z) and the new backup should replace 1, 1 should replace 2, 2 should replace 3, and 3 should be deleted.
c. Your script must do this for ALL user directories in /home
Write a script which adds a list of users non-interactively.
a. Your script should read the names of the users (each on a line by themselves) from STDIN
b. Other than the defaults, set the password (to the user’s name), ensure directory creation, and lock the account after creation.
c. Your script should check to see if the user already exists and NOT attempt to add the user if the user exists (hint: `cat /etc/passwd | grep $username` and check to see if empty)
d. STDIN implies it should run like: cat /root/users | ./[url removed, login to view]
Write a shell script which takes a regular file from the command line, performs some basic error checking (file must exist and be readable) and displays the results of ls –l command for the given file, followed by a blank line, followed by the contents of the file line by line with each line number prepended on the same line.
a. Command line implies command will be run like: ./[url removed, login to view] filename
26 freelancers are bidding on average $71 for this job
We are freelance software developers. If you contact me I can give a quote for your project and we can discuss the details. www.<b><i>Removed by Admin</i></b>
I have been working with Bash/shell scripting from long time, to automate tasks, schedule backups and lots of other tasks. Best person to finish the job. Please check PM for more details.