Q4. Check the attached file for the solution.
a) ls -fd D*
b) ls -d */
c) ls -ap|egrep "^\..*/$"
Q5. Check the attached file for solution
a) ls sec*
b) ls sec*[1-3]
c) ls in*
d) ls sec*[13] ref[13]
Q6
a) cat >[email protected]
b) cp [email protected] myname
c)mkdir backup
d) mv [email protected] \backup\mynewname
e) cp -r backup backp2
f) rmdir -r backup
g) mv backup2 backup3
h) ls backcup3
7)
a) cd Documents
b) cat > file1
hello
ctrl+z
c) ln file1 file2
d) ln -s file1 soft1
ln -s file2 soft2
e)ls -l file1 file2 soft1 soft2
f)yes,the contents will be same,we can check using:-
cmp file1 file2
cmp soft1 soft2
g) ln soft1 file3
h) vi soft2
after changing in this file,all the files get change and will have same contents
i) mv file1 change
after that use ls -l view the details and now the links will be in different color
8)
a) 744
b) 665
c)rwxr_xr_x
d)rw_r__r__
do numbers 4-8 4. Given any directory, use the Is command to display: • all files...
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,...
Question 11 You are in the oranges directory. Write the command to copy the mandarin file to the apples directory. Use a relative path. 2 points Question 12 Which command do you use to rename files and directories? A. uname B. mv C. rn D. rename 2 points Question 13 You are in the oranges directory. Write the command to list...
As you know, Is lists all the files in a directory and wc counts words, characters, and lines. Which of the following operations counts the amount of files (and directories)? Select one: O b. Is wc -w c. Is 1I cat | wc -w In the picture an output of the command Is -I is shown. Which of the following statements is true? druxruxrux. 3 kuivi users 80 May 16 2001 dir ru-ru-rw-. 1 kuivi users 1696 Oct 19 1995...
a) How would you use the ls command to display all of the files/directories in the directory ‘/sbin’ that start with ‘bl’? b) How would you use the ls command to display all of the files/directories in your current directory that contain the word ‘grade’ somewhere in the name and end with ‘.pdf’? c) How would you use the ls command to display all of the files/directories in your current directory that are any two characters followed by the file...
20. Write the DOS command to erase a file named FILEBILL which is stored in the sub-directory named MYFILES located at the root of drive C. 21. Write the DOS command to return you to the root of drive C if your current directory is C:\TEACHING OPSYS\SUMM 22. Write the DOS command to erase all the files on drive A. 23. Write the DOS command to delete a subdirectory named DIRFRED which is located at the root of drive C....
2. Answer the correct command instructions to complete the following: a. What is the admin account (username) you created in Lab 1 and write down its home directory (full folder name)? [0.5 pts) b. Assume the following directory structures in your home directory: • /home/(username)/ — use your own (home directory) • /home/(username) /Dir1.0/Dir1.1/ • /home/(username) /Dir2.0/Dir2.1/ in your home directory, create directories Dir1.0 & Dir 2.0, then create directories Dirl.1 & Dir2.1 inside other directories according to above. [1...
Problem 4: Write a Bash script that removes all zero length ordinary files in the directory (including those in the sub-directories at all levels) passed as an optional argument. If you do not specify the directory argument, the script uses the current working directory as the default argument. This problem is for practicing bash programming skills. Though there is an easier way to achieve the goal with the find command, the find command is not allowed to appear in your...
Objective: Practice common UNIX commands. Procedure: The following list of Unix commands are given for self-learning. Use 'whatis' or 'man' command to find out about each command. Your document should include the description or screen shots of the output from each of the command. Commands: df du gzip file history wget Changing access rights: chmod u+x Dir1.0 adds execute permission for the owner chmod go-w file1 removes write permission for the group and others chmod ugo=rw testfile sets...
I'm stuck, if you can provide the code I can put it into the BASH environment Executing tasks: In this section of the project, you will demonstrate your ability to execute Linux commands to create files and create and organize the Linux directory structure. At the end of this section, you will create a log file that will include a list of all the commands you used to complete these steps. VII. In the workspace directory, create new directories titled...
Homework 1- Merge Files: 1. Design a class named MergeFiles 1 Three file names are passed as command-line arguments to MergeFiles as follows: java MergeFiles filel file2 mergedFile II. MergeFiles reads names stored in files file and file2 III. Merges the two list of names into a single list IV. Sorts that single list V. Ignores repetitions VI. Writes the sorted, free-of-repetitions list to a new file named mergedFile.txt VII. The names in all three files are stored as one...