Question

In: Computer Science

What are the UNIX commands for each of these steps? 1. Copy all of the files...

What are the UNIX commands for each of these steps?

1. Copy all of the files in your Files directory to the Backup directory.
2. Create an ITE130 directory in the Classes Directory
3. Move all the ITE 130 files from the backup directory to the ITE130 directory.
4. Redirect echo step 19 to mark this step in the lab3.txt file
5. Display all of the directories and sub-directories including files so I can verify you completed all the
above steps correctly.
6. Repeat the above step and redirect the output to the file lab3.txt without erasing what is already in it!

Solutions

Expert Solution

1. Copy all of the files in your Files directory to the Backup directory.

$ cp * /backup

  • cp : it is used to copy files from one directory to another.
  • Here * is a star wildcard which selects all the files.
  • /backup:this is your backup directory where all the files from your current dircetory gets copied to backup directory.

2. Create an ITE130 directory in the Classes Directory

mkdir directory/ITE130.
  • mkdir:it a command to create directory
  • directory:This is a class name which is considered as directory name and using directory/ITE130 creates ITE130 dircetory in specified directory which is directory.

3.Move all the ITE 130 files from the backup directory to the ITE130 directory.

Imagining /backup is the directory where all ITE130 files are stored.

$ cp */directory /backup

  • first we create a backup directory by copying all files from directory dir(*/directory)to backup directory
$ mv /backup/*  /ITE130
  • mv:mv command is used to move the files or directories from one directory to another directory.
  • /backup/*:/backup is the directory name where all the ITE130 files are backed up , /* selects all the files from /backup directory to /ITE130 directory.

4. Redirect echo step 19 to mark this step in the lab3.txt file

$echo step 19 >lab3.txt

  • step 19 are the command lines in echo whic are redirected into the file lab3 text file

5. Display all of the directories and sub-directories including files so I can verify you completed all the
above steps correctly.

$ ls -d $PWD/*

  • list all directories and files with full path name

Related Solutions

What are the UNIX commands for each of these steps? 1. Delete all the files in...
What are the UNIX commands for each of these steps? 1. Delete all the files in the Classes and Backup directories only. 2. Redirect echo step 23 to mark this step in the lab3.txt file 3. Display all of the directories and sub-directories including files so I can verify you completed all the steps correctly. 4. Repeat the above step and redirect the output to the file lab3.txt without erasing what is already in it! 5. Redirect echo step 26...
Basic Unix Commands Objective: The objective of this lab is to work with files of UNIX...
Basic Unix Commands Objective: The objective of this lab is to work with files of UNIX file system. Procedure: 1. OpenyourUnixshellandtrythesecommands: Ø Create a new file and add some text in it vcat > filename Ø View a file vcat /etc/passwd vmore /etc/passwd vmore filename Ø Copy file, making file2 vcp file1 file2 Ø Move/rename file1 as file2 vmv file1 file2 Ø Delete file1 as file2 vrm file //Deletefile //Double-checkfirst vrm -i file Ø Counts the lines, words, characters in...
Unix/Linux Turn in the following commands and any output from the commands. 1) ll to show the original 3 files
Unix/LinuxTurn in the following commands and any output from the commands.1) ll to show the original 3 files2) run the tar command to stuff three files3) ll to show the 'tar archive'4) mkdir newdir to create a new directory to unstuff the 'tar archive'
Objective: Practice common UNIX commands. Procedure: The following list of Unix commands are given for self-learning....
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...
Task 1: Getting familiar with Unix commands Questions: How do you remove a directory and all...
Task 1: Getting familiar with Unix commands Questions: How do you remove a directory and all of its contents, including any subdirectories and files, without using rmdir repeatedly?         [5 Points] Go to your home directory (i.e. /home/) and enter the following command: ls -ali Explain the output. You need to clearly what each column specifies, what are the values in each column means. Also explain how it is different from: ls -li    [5 Points] How will you copy directory (not...
What are the UNIX codes for each of these steps Display the directories and sub-directories including...
What are the UNIX codes for each of these steps Display the directories and sub-directories including files so I can verify your starting point. Redirect the above step to the lab3.txt file Make a sub-directory named Files in your user directory
Unix / Linux 31. Given the first two commands, what is the expected output for the...
Unix / Linux 31. Given the first two commands, what is the expected output for the third command? (single quotes) $ echo * a b c $ x=* $ echo '$x' 32. Given the first two commands, what is the expected output for the third command? (Single quotes inside of double quotes) $ echo * a b c $ x=* $ echo "'$x'" 33. Given the first two commands, what is the expected output for the third command? (double quotes...
QUESTION 1 Match the following LINUX/UNIX commands with what they do. du    whereis users who...
QUESTION 1 Match the following LINUX/UNIX commands with what they do. du    whereis users who am i A. display a compact list of users currently logged in B. locate the binary, source, and manual page files for a command C. summarize disk usage D. who am i currently logged in as on the Linux server. QUESTION 2 What rm command option (flag) would you use to remove a file that begins with a - (hyphen)? -f -p --   ...
What is the definition of the FTP server? What are the steps to receive the files...
What is the definition of the FTP server? What are the steps to receive the files from the FTP server? Explain and justify jour answer by drawing
UNIX treats file directories in the same fashion as files; that is, both are defined by...
UNIX treats file directories in the same fashion as files; that is, both are defined by the same type of data structure, called an inode. As with files, directories include a nine-bit protection string. If care is not taken, this can create access control problems. For example, consider a file with protection mode 644 (octal) contained in a directory with protection mode 730. How might the file be compromised in this case?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT