In: Computer Science
$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