This is the command prompt for Linux Command Format touch a
This is the command prompt for Linux.
Command Format: touch [-a] filename(s)
Use file command to determine what kind of file it is.
$ file my_file
My_file: ASCII text
The file in the preceding example is a text file.
Enter the command to verify the location, what command do you use?
What is the result?
Also what do I do for this.
Copy the nuts file from the coffees subdirectory to the practice directory using a relative pathname from your current user2 directory.
What command did you use? Click here to enter text.
j. While in your user2 directory, create a new subdirectory called play under the practice directory
using. What command did you use? Type in all your answers
k. Copy the notes file from the dir2 subdirectory to the play subdirectory you just created directory
using a relative pathname. What command did you use? Type in all your answers
l. Using a single command, copy all of the files starting with the letters “fr” in your current directory to the play subdirectory using a wildcard.
What command did you use? Type in all your answers
m. Display a long listing for all files under the play subdirectory from your current directory.
What command did you use? Type in all your answers
n. How many files under the play directory? Type in all your answers
Solution
Here is the code for you:
Also what do I do for this.
Copy the nuts file from the coffees subdirectory to the practice directory using a relative pathname from your current user2 directory.
What command did you use? Click here to enter text.
j. While in your user2 directory, create a new subdirectory called play under the practice directory
using. What command did you use? Type in all your answers
mkdir ../practice/play will create a subdirectory play under the practice directory.
k. Copy the notes file from the dir2 subdirectory to the play subdirectory you just created directory
using a relative pathname. What command did you use? Type in all your answers
cp dir2/notes ../practice/play will copy the notes file from dir2 to play directory.
l. Using a single command, copy all of the files starting with the letters “fr” in your current directory
to the play subdirectory using a wildcard.
What command did you use? Type in all your answers
cp fr* ../practice/play/ will copy all the files starting with fr, to a play directory.
m. Display a long listing for all files under the play subdirectory from your current directory.
What command did you use? Type in all your answers
ls -lf ../practice/play/ will list all the files in the play directory.
n. How many files under the play directory? Type in all your answers
ls -lf ../practice/play | wc -l will list the number of files in the play directory.
![This is the command prompt for Linux. Command Format: touch [-a] filename(s) Use file command to determine what kind of file it is. $ file my_file My_file: ASCI This is the command prompt for Linux. Command Format: touch [-a] filename(s) Use file command to determine what kind of file it is. $ file my_file My_file: ASCI](/WebImages/23/this-is-the-command-prompt-for-linux-command-format-touch-a-1056105-1761551005-0.webp)
![This is the command prompt for Linux. Command Format: touch [-a] filename(s) Use file command to determine what kind of file it is. $ file my_file My_file: ASCI This is the command prompt for Linux. Command Format: touch [-a] filename(s) Use file command to determine what kind of file it is. $ file my_file My_file: ASCI](/WebImages/23/this-is-the-command-prompt-for-linux-command-format-touch-a-1056105-1761551005-1.webp)