Question

In: Computer Science

Using one Unix command, how to go to my home directory using tilde, ~. Using one...

  1. Using one Unix command, how to go to my home directory using tilde, ~.
  2. Using one Unix command, how to go to your home directory using tilde, ~.
  3. Make sure you are in your home directory.
    Using one Unix command, how to go to your hw4 directory inside your hw directory, inside your it244directory using a relative pathname.
  4. Using one Unix command, how to go to my home directory using an absolute pathname.
  5. Using one Unix command, how to go to the it244_files directory inside the course_files directory, inside my home directory, using an absolute pathname.
  6. Using one Unix command, how to go to my home directory using a relative pathname using ...
  7. Using one Unix command, go to your home directory.
    Once you are there go to your it244 directory using a relative pathname.
  8. How would you make sure you are in your it244 directory.
    Using touch create a file named test.txt.
    Go to your hw4 directory.
    Using .. stay in your hw4 directory but list the contents of your it244 directory.
  9. How to make sure you are in your hw4 directory.
  10. Stay in this directory and copy the test.txt file from your it244 directory to your hw4 directory using a relative pathname.
  11. Using one Unix command and multiple instances of.., go to your home directory.
    Once you are there, show me that you are in the right directory.
    Using one Unix command, copy the test.txt file from your it244/hw/hw4 directory to your home directory.
    List the contents of the directory

Solutions

Expert Solution

$cd ~

---- Unix command,to go to my home directory using tilde, ~.

$cd ~username

   replace the "username" with the name of the user which you required to go his home directory

$pwd

this command display the path of the current directory.

$cd it244/hw/hw4

using above command you can gohw4 directory inside your hw directory, inside your it244directory using a relative pathname.

$pwd

this command shows your current working directory after going to it244 directory use this command this shows the full path of current directory

$cd /home

using this command you can to my home directory using an absolute pathname.

$cd /course_files/it244_files

Using this one Unix command, how to go to the it244_files directory inside the course_files directory, inside my home directory, using an absolute pathname

$cd ..

using this command you can go you home directory where you current working directory is /home/username

$ls [absolute path of it244 directory]

replace the square brackets with the path of it244 directory ,this command list the conntes of it244 directory

without leaving hw4 directory

$cp /path/to/it244/test.txt .

Stay in this directory and copy the test.txt file from your it244 directory to your hw4 directory using a relative pathname. here replace /path/to with path of it244 directory and last "." is for destinaton for the filed to be copied is current directory i.e. hw3

$cd ..

using multiple instances of above command you can go to your home directory i.e exicute this command multiple time until you go your home directory

onece you reach in you home directory

execute the command below to copy test.txt file in it244/hw/hw4 in your home directory

$cp /path/to/it244/hw/hw4/test.txt .

before executing this command

replace the /path/to in above command with path of absolute path of it244 directory

$ls

use above command to list the contents of the directory


Related Solutions

Unix command lines. A) Assume that your current working directory is NOT the same as your...
Unix command lines. A) Assume that your current working directory is NOT the same as your home directory. Print all file and subdirectory names of your home directory into a file named file2. B) Copy the text from line 11 to line 20 of a given file input.txt and append the copied text at the end of the file output.txt. (Assume that the file input.txt contains more than 20 lines of text contents) C) Count and display the total number...
unix/Linux Create a tar command using the man command and the link referred to in To...
unix/Linux Create a tar command using the man command and the link referred to in To Practice and Explore: Text File Utilities #9. Preliminaries Use the man pages to learn more about tar Review the links referred to in To Practice and Explore: Text File Utilities #9 to see examples of using tar command Perform Use tar "to stuff" three files and then "unstuff" them into a new directory. Include the -v option. Task ll to show the original 3...
UNIX/LINUX SCRIPT: Create a named directory and verify that the directory is there by listing all...
UNIX/LINUX SCRIPT: Create a named directory and verify that the directory is there by listing all its contents. Write a shell script to validate password strength. Here are a few assumptions for the password string.   Length – a minimum of 8 characters. • Contain alphabets , numbers , and @ # $ % & * symbols. • Include both the small and capital case letters. give a prompt of Y or N to try another password and displays an error...
Move the file “nfile2” into the “unix” directory. Copy the file “nfile1” into the “java” directory....
Move the file “nfile2” into the “unix” directory. Copy the file “nfile1” into the “java” directory. Show how you would create the files “test1”, “test2”, & “test3” in the “test” directory to ensure that they have the same file creation date/time. From the ~ folder, use the * and then the [ ] wildcard procedures to list all the files in the “test” directory. From the directory structure above, give an example of a relative path & an absolute path....
1. Compare the Unix directory and the windows directory and answer the following: a. Match 3...
1. Compare the Unix directory and the windows directory and answer the following: a. Match 3 Unix directories to a Windows directory that is similar in function. Briefly describe their similarities and differences. b. Find a directory in Unix that appears to have no equivalent in Windows. What does it do? c. Find a directory in Windows that appears to have no equivalent in Unix. What does it do?
Using sed unix / linux command how would I execute this: Move the first 2 characters...
Using sed unix / linux command how would I execute this: Move the first 2 characters on each line to the end of the line
What are the permissions for your home directory set by your system administrator? What command did...
What are the permissions for your home directory set by your system administrator? What command did you use to answer the question? Show your session.
1. What command is used to change the current working directory at the command line?
1. What command is used to change the current working directory at the command line?
unix question please write a program and then show how to use top command that shows...
unix question please write a program and then show how to use top command that shows the zombie process, give snapshot of top command that shows the zombie process Write a very simple program that will show the possibility of having zombie processes. Write a program named zombie.c The main process will create a child. The child prints something like: “I am the child with pid ….. and my parent has ppid ….” Next, the child will sleep for 1...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT