5.Create two files also called file file1 and file2 in
testdir_2
Use the ls -lR to show you created the directories
6. Change the permission of the files in the directories below and
show their permissions
testdir/testdir_1/file1 where owner has read and execute
permissions
testdir/testdir_1/file2 where where owner has read, write and
execute permissions. Group has read only permissions
7. Create a directory called newdir/newdir_1/newdir_2
copy the file testdir/testdir_1/file1 to this directory
Change the permisions of the file to owner, group and everyone/all
read only
8. Use the editor nano and edit the file
newdir/newdir_1/newdir_2/file1
Put the following text in it:-
# !/bin/bash
echo “Hello World”
echo “I just wrote my first script using a CLI editor”
5.
mkdir testdir_2 -- creates directory
touch \testdir_2\file1 -- file creation
touch \testdir_2\file2
ls –lR
-- display files and directories
Output

6.
chmod o+rx testdir/testdir_1/file1
chmod o+rwx testdir/testdir_1/file2
chmod g+r testdir/testdir_1/file2
ls-r
7.

Command: Cp <source> <destination>
cp testdir/testdir_1/file1 newdir/newdir_1/newdir_2
chmod a+r
file1
-- a is for every one
8.
nano file1
Type text given

Press Ctrl +X to exit , Say Y to save and confirm file name
5.Create two files also called file file1 and file2 in testdir_2 Use the ls -lR to show you created the directories 6. Change the permission of the files in the directories below and show their permi...
Objective : Write a C Shell script which copies all files(*.java and *.class) from your home directory to a new one, and Analyze the new directory information such as number of files, user permissions, and disk usage. Sample Output: << CS Directory Analysis >> Date: ============================================================ Current Directory: /home/tomss New Directory Created : /home/tomss/pgm01 File information Total Number of files : 22 files Directory files: 0 files Plain text files: 10 files File have read permissions: 3 files File have...
Starting from the Linux default permission for file and directories, what umask would you use to ensure that for all new files, the owner would have read and execute; members of the group would have read, write and execute; and others would have execute?
do numbers 4-8
4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...
1. Give the command (single command or pipelined series of commands) that performs each of the following tasks. Assume bash, and the commands we have been discussing. Do not use things like perl, awk, python, etc. Unless specifically stated otherwise, assume that the command should work no matter what your current working directory is or where a user's home directory is located. Use only flags that are required by the question as stated. Assume you are logged in as a "normal" (non-administrator) user,...
Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...
In this exercise, you will create a script called file_ops.sh that uses the various file operators The file_ops.sh script will Use one command line argument Use four IF THEN statement to compare the first command line argument Determine which file operators to use that produces the following output when the script run with the arguments shown WARNING: In the IF THEN statements, to avoid syntax error messages, there must be a space before and after each bracket and also between...
UNIX File Permission help, please answer the questions in the
green boxes. Thank you
Lab 03 File Permissions In this lab we will: learn about file permissions learn to create symbolic links and hard links Utilities that will be utilized in this Lab: us, cd, less, cat touch, chmod id umask, mkdir, In, echo and redirection Users and Groups Linux supports several methods of controlling access to files an directories. In this lab we are going to learn the traditional...
Step 3: How would you write this script in C? It needs to do the
things required in step 3.
1. You have received a new batch of distinguished users; their basic information is located in newusers.tar. Inside of the tar file, there is a file called "newusers.txt" which contains a colon-separated entry for each user: the username, the uid, the GECOS information, and the user's preferred shell. Also in the tar file you will find a public key for...