Navigate into dir2 using relative path and create a file named testfile.txt. (Check its path using pwd)

1 min read
If you are in your home directory (~
), use:
bashCopyEditcd dir2
If you are elsewhere, use the relative path accordingly, e.g., from dir1
:
bashCopyEditcd ../dir2
Step 2: Create a File Named testfile.txt
bashCopyEdittouch testfile.txt
Step 3: Verify the File Path Using pwd
bashCopyEditpwd
Expected Output:
arduinoCopyEdit/home/yourusername/dir2
This confirms that testfile.txt
is located inside dir2
.
0
Subscribe to my newsletter
Read articles from Ravi Vishwakarma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
