Linux File System Management with Scripts
VerifiedAdded on  2023/06/07
|16
|1536
|421
AI Summary
This project is divided into five tasks: automated account management, designing file systems, implementing the file system, making the file system accessible and robust, and file system management with scripts. Learn how to manage file and user system in Linux with step-by-step guide and scripts.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
LINUX
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Table of Contents
Introduction................................................................................................................................2
Task 1: Automated Account Management.................................................................................2
Task 2: Designing File Systems.................................................................................................6
Task 3: Implementing the File system.......................................................................................8
Task 4: Making the File System accessible and robust..............................................................9
Task 5: File System Management with Scripts........................................................................12
Conclusion................................................................................................................................13
References................................................................................................................................15
1
Introduction................................................................................................................................2
Task 1: Automated Account Management.................................................................................2
Task 2: Designing File Systems.................................................................................................6
Task 3: Implementing the File system.......................................................................................8
Task 4: Making the File System accessible and robust..............................................................9
Task 5: File System Management with Scripts........................................................................12
Conclusion................................................................................................................................13
References................................................................................................................................15
1
Introduction
This projects is used to develop the simple scripts to manage the file and user system
whilst and developing the some expertise in managing a complex file system. This project is
divided into five task like automated account management, designing a file systems,
implementing the file system, making the file system accessible and robust and file system
management with scripts. In automated account management task, we are going to prepare
the two shell scripts and it is used to manage the user information. First shell script is used for
reads the text file called users.txt that contains the following information and the second
scripts is used to remove the user account. In Designing File Systems task, we will
requirements to fabricate the server to store the client information by utilizing the ZFS
volume. The volumes are become the without limits and it was felt that the ZFS framework
and this framework ought to be utilized for every volume. The OS itself needs not be on a
ZFS volume. In implementing the file system task, it is used to implement the storage system.
In making the file system accessible task, we will create another virtual machine to do mount
a NFS exported volume from the server and backup all the data on the ZFS volumes by using
the ZFS. In file system management with scripts task, we will create the two scripts for file
system management. The First scripts is to make the user home directories are owned and
only accessible by the owner and second script is to looks the file system to find the objects
like mp3. These are will be executed and discussed in detail.
Task 1: Automated Account Management
This task is used to create the two shell scripts which manage the user information.
First shell script is used for reads the text file called users.txt that contains the following
information. It is illustrated below ("Beginning Grep for Linux SysAdmins", 2018).
2
This projects is used to develop the simple scripts to manage the file and user system
whilst and developing the some expertise in managing a complex file system. This project is
divided into five task like automated account management, designing a file systems,
implementing the file system, making the file system accessible and robust and file system
management with scripts. In automated account management task, we are going to prepare
the two shell scripts and it is used to manage the user information. First shell script is used for
reads the text file called users.txt that contains the following information and the second
scripts is used to remove the user account. In Designing File Systems task, we will
requirements to fabricate the server to store the client information by utilizing the ZFS
volume. The volumes are become the without limits and it was felt that the ZFS framework
and this framework ought to be utilized for every volume. The OS itself needs not be on a
ZFS volume. In implementing the file system task, it is used to implement the storage system.
In making the file system accessible task, we will create another virtual machine to do mount
a NFS exported volume from the server and backup all the data on the ZFS volumes by using
the ZFS. In file system management with scripts task, we will create the two scripts for file
system management. The First scripts is to make the user home directories are owned and
only accessible by the owner and second script is to looks the file system to find the objects
like mp3. These are will be executed and discussed in detail.
Task 1: Automated Account Management
This task is used to create the two shell scripts which manage the user information.
First shell script is used for reads the text file called users.txt that contains the following
information. It is illustrated below ("Beginning Grep for Linux SysAdmins", 2018).
2
Shell Script
#!/bin/bash
FILE="/home/ubuntu/Documents"
echo "*** File - $FILE contents ***"
cat $FILE
To run the shell script by monitors the below steps,
Open terminal and go to script location by using the cd command.
After, gives the file permission by typing following command on terminal.
chmod +x user.sh
Finally, run the shell scripts by typing the below command on terminal.
./user.sh
This process is illustrated as below ("BeginningLinux.com", 2018).
3
#!/bin/bash
FILE="/home/ubuntu/Documents"
echo "*** File - $FILE contents ***"
cat $FILE
To run the shell script by monitors the below steps,
Open terminal and go to script location by using the cd command.
After, gives the file permission by typing following command on terminal.
chmod +x user.sh
Finally, run the shell scripts by typing the below command on terminal.
./user.sh
This process is illustrated as below ("BeginningLinux.com", 2018).
3
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
After, we will assume the users on the system without any interactive input by use the
following command on terminal. This process is illustrated as below.
Here, the second scripts is used to remove the user account and it is illustrated as below
(Edwards, 2013).
#!/bin/bash
#
for user
4
following command on terminal. This process is illustrated as below.
Here, the second scripts is used to remove the user account and it is illustrated as below
(Edwards, 2013).
#!/bin/bash
#
for user
4
do
userdel r $user
done
#
for user1
do
rm -rM /home/$user1
done
#
The output is shown below.
Home directory archiving is shown below.
5
userdel r $user
done
#
for user1
do
rm -rM /home/$user1
done
#
The output is shown below.
Home directory archiving is shown below.
5
Task 2: Designing File Systems
Here, we will requirements to fabricate the server to store the client information by
utilizing the ZFS volume ("Linux Beginner Tutorials", 2018). The volumes are become the
without limits and it was felt that the ZFS framework and this framework ought to be utilized
for every volume. The OS itself needs not be on a ZFS volume. All the ZFS volumes are
ought to be built in such an approach to guarantee the insurance of information and it
managed in case of neighbourhood circle disappointment. In the first place, client needs to
introduce the ZFS by utilizing the accompanying advances (Hales, 2013). To start with, see
the sources are empowered or not by enter the accompanying summon and it is represented as
underneath (McGrath, 2006).
6
Here, we will requirements to fabricate the server to store the client information by
utilizing the ZFS volume ("Linux Beginner Tutorials", 2018). The volumes are become the
without limits and it was felt that the ZFS framework and this framework ought to be utilized
for every volume. The OS itself needs not be on a ZFS volume. All the ZFS volumes are
ought to be built in such an approach to guarantee the insurance of information and it
managed in case of neighbourhood circle disappointment. In the first place, client needs to
introduce the ZFS by utilizing the accompanying advances (Hales, 2013). To start with, see
the sources are empowered or not by enter the accompanying summon and it is represented as
underneath (McGrath, 2006).
6
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
After, we will update the system by typing below command (Saive, 2018).
7
7
Task 3: Implementing the File system
Here, we will implement the storage system by install the new Ubuntu virtual
machine and ZFS utilities. These are discussed in below.
Install Ubuntu virtual Machine. It is shown below.
8
Here, we will implement the storage system by install the new Ubuntu virtual
machine and ZFS utilities. These are discussed in below.
Install Ubuntu virtual Machine. It is shown below.
8
Install the ZFS utility.
Task 4: Making the File System accessible and robust
Here, we will create another virtual machine to do mount a NFS exported volume from the
server and backup all the data on the ZFS volumes by using the ZFS. These are discussed in
below.
Also install another virtual machine,
9
Task 4: Making the File System accessible and robust
Here, we will create another virtual machine to do mount a NFS exported volume from the
server and backup all the data on the ZFS volumes by using the ZFS. These are discussed in
below.
Also install another virtual machine,
9
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Here, we will mount the NFS exported volume from the server and also backup all the data
on the ZFS volume on the server. These are discussed in below. First, view the disk volumes
by enter the following command and it is illustrated as below.
10
on the ZFS volume on the server. These are discussed in below. First, view the disk volumes
by enter the following command and it is illustrated as below.
10
After, create the pool named as pool-name. It is demonstrated as below (Thomas & Vugt,
2011).
11
2011).
11
Finally user successfully designed the ZFS volume ("www.reallylinux.com - Website for
Linux Beginners", 2018).
Task 5: File System Management with Scripts
Here, we will create the two scripts for file system management. The First scripts is to
make the user home directories are owned and only accessible by the owner ("Ubuntu blog",
2018). It is shown below.
for dir in /home/ubuntu*
do
if [ -d "$dir" ]
then
username=$(basename "$dir")
echo "chown -R $username $dir"
fi
done
The second script is to looks the file system to find the objects like mp3. It is shown below
(Ubuntu Netbooks, 2010).
#!/bin/sh
12
Linux Beginners", 2018).
Task 5: File System Management with Scripts
Here, we will create the two scripts for file system management. The First scripts is to
make the user home directories are owned and only accessible by the owner ("Ubuntu blog",
2018). It is shown below.
for dir in /home/ubuntu*
do
if [ -d "$dir" ]
then
username=$(basename "$dir")
echo "chown -R $username $dir"
fi
done
The second script is to looks the file system to find the objects like mp3. It is shown below
(Ubuntu Netbooks, 2010).
#!/bin/sh
12
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
file="$1"
outfile=${file%.flac}.mp3
eval $(metaflac --export-tags-to - "$file" | sed "s/=\(.*\)/='\1'/")
flac -cd "$file" | lame --preset fast extreme \
--add-id3v2 --tt "$TITLE" --ta "$ARTIST" --tl "$ALBUM" \
--ty "$DATE" --tn "$TRACKNUMBER" --tg "$GENRE" \
- "$outfile"
Conclusion
This projects successfully developed the simple scripts to manage the file and user
system whilst and developing the some expertise in managing a complex file system. This
project is divided into five task like automated account management, designing a file
systems, implementing the file system, making the file system accessible and robust and file
system management with scripts. In automated account management task, we are
successfully prepared the two shell scripts and it is used to manage the user information. In
Designing File Systems task, we are successfully fabricate the server to store the client
13
outfile=${file%.flac}.mp3
eval $(metaflac --export-tags-to - "$file" | sed "s/=\(.*\)/='\1'/")
flac -cd "$file" | lame --preset fast extreme \
--add-id3v2 --tt "$TITLE" --ta "$ARTIST" --tl "$ALBUM" \
--ty "$DATE" --tn "$TRACKNUMBER" --tg "$GENRE" \
- "$outfile"
Conclusion
This projects successfully developed the simple scripts to manage the file and user
system whilst and developing the some expertise in managing a complex file system. This
project is divided into five task like automated account management, designing a file
systems, implementing the file system, making the file system accessible and robust and file
system management with scripts. In automated account management task, we are
successfully prepared the two shell scripts and it is used to manage the user information. In
Designing File Systems task, we are successfully fabricate the server to store the client
13
information by utilizing the ZFS volume. In implementing the file system task, this task
successfully implemented the storage system. In making the file system accessible task, we
are successfully created another virtual machine to done mount a NFS exported volume from
the server and backup all the data on the ZFS volumes by using the ZFS. In file system
management with scripts task, we are successfully created the two scripts for file system
management. These are executed and discussed in detail.
14
successfully implemented the storage system. In making the file system accessible task, we
are successfully created another virtual machine to done mount a NFS exported volume from
the server and backup all the data on the ZFS volumes by using the ZFS. In file system
management with scripts task, we are successfully created the two scripts for file system
management. These are executed and discussed in detail.
14
References
Apress. (2010). Ubuntu Netbooks.
Beginning Grep for Linux SysAdmins. (2018). Retrieved from
https://www.linux.com/learn/beginning-grep-linux-sysadmins
BeginningLinux.com. (2018). Retrieved from http://www.beginninglinux.com/
Edwards, C. (2013). Instant Ubuntu. Packt Publishing.
Linux Beginner Tutorials. (2018). Retrieved from https://www.linux.org/forums/linux-
beginner-tutorials.123/
McGrath, M. (2006). Linux. Southam, Warwickshire, UK: In easy steps/Computer Step.
Saive, R. (2018). BEGINNER'S GUIDE FOR LINUX - Start Learning Linux in Minutes.
Retrieved from https://www.tecmint.com/free-online-linux-learning-guide-for-beginners/
Thomas, K., & Vugt, S. (2011). Beginning Ubuntu Linux. New York, NY: Apress.
Ubuntu blog. (2018). Retrieved from https://blog.ubuntu.com/
www.reallylinux.com - Website for Linux Beginners. (2018). Retrieved from
http://www.reallylinux.com/
15
Apress. (2010). Ubuntu Netbooks.
Beginning Grep for Linux SysAdmins. (2018). Retrieved from
https://www.linux.com/learn/beginning-grep-linux-sysadmins
BeginningLinux.com. (2018). Retrieved from http://www.beginninglinux.com/
Edwards, C. (2013). Instant Ubuntu. Packt Publishing.
Linux Beginner Tutorials. (2018). Retrieved from https://www.linux.org/forums/linux-
beginner-tutorials.123/
McGrath, M. (2006). Linux. Southam, Warwickshire, UK: In easy steps/Computer Step.
Saive, R. (2018). BEGINNER'S GUIDE FOR LINUX - Start Learning Linux in Minutes.
Retrieved from https://www.tecmint.com/free-online-linux-learning-guide-for-beginners/
Thomas, K., & Vugt, S. (2011). Beginning Ubuntu Linux. New York, NY: Apress.
Ubuntu blog. (2018). Retrieved from https://blog.ubuntu.com/
www.reallylinux.com - Website for Linux Beginners. (2018). Retrieved from
http://www.reallylinux.com/
15
1 out of 16
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
 +13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024  |  Zucol Services PVT LTD  |  All rights reserved.