INTRO TO UNIX COURSE
Suppose that you wished to copy all of the text files from your fileAsst directory and all of the files from your fileAsst/Planes directory into your current directory (without typing out the name of each individual file). What command would you give to make that copy?
Direct Paths I wish to copy from:
/home/ndashiel/UnixCourse/fileAsst
/home/ndashiel/UnixCourse/fileAsst/Planes
Direct Path I would like to copy into:
/home/ndashiel/UnixCourse/commandsAsst
Please help me with this, I have been struggling on this for a while, it always tells me I'm not doing it right and i have searched for the answer everywhere but non of them seem to work.
Thanks, <3
Linux Commands:
The star wildcard represents anything i.e. all files. To copy
all the files in a directory to a new directory, enter:
example : $ cp * /home/tom/backup
The star wildcard represents anything whose name ends with the
.txt extension. So, to copy all the document files (*.doc) in a
directory to a new directory, enter:
example : $ cp *.txt /home/tom/backup
Answer:
cp /home/ndashiel/UnixCourse/fileAsst/*.txt /home/ndashiel/UnixCourse/commandsAsst
cp /home/ndashiel/UnixCourse/fileAsst/planes/*.txt /home/ndashiel/UnixCourse/commandsAsst
INTRO TO UNIX COURSE Suppose that you wished to copy all of the text files from...
Suppose that you wished to copy all of the text files from your fileAsst directory and all of the files from your fileAsst/Planes directory into your current directory (without typing out the name of each individual file). What command would you give to make that copy?
1) Write a single line UNIX command to list all sh files matching the multiple conditions below: • at directory "/home/test" • filename containing "exam" 2) Write a single line UNIX command to check if "/home/exam2" in the PATH variable. 3) How to obtain the value of command line arguments in a shell program? 4) Write a single line UNIX command to run an executable Java program Hello at background and output the number of lines in the result. 5)...
Hello, I'm currently taking an introductory to Unix as a online course and I was given this question. "How would you compare using the find command on a Linux server with your ability to find files on either a Windows or IOS operating system?" Although this may seem like an opinion based question, my professor seems to grade really hard in my opinion. And with little knowledge of the find command I wanted to know how would someone else go...
4. (15%) Show the commands you would use change the current working directory from student’s home directory: /home/student to the student’s apache web directory:/var/www/student using: a. (5%) A series of relative commands b. (5%) A single relative command c. (5%) A single absolute command 5. (20%) Suppose you are presently in the /home/student folder and you wish to copy a file (file3.jpg) from the /home/seed/pics directory to your current directory. Provide two sets of copy commands to accomplish your goal:...
e) In the context of Unix file system , what does "path" means? f) Write down the absolute path for the main.cpp in the timeproj directory g)Write down the relative path from inside timeproj directory to the prgm1.cpp file h)Write down the Unix commands and key strokes needed to create a new sourcefile named time.cpp and then save it to disk using the pico editor. i) In Unix each file has three access modes, namely r,w, and x. 1) Write...
Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume you are started at your home directory. Perform a command that displays the absolute path of your home directory (your current location). Create a new directory inside your home directory and name it “Assignment-3” Without moving into the directory you just made (staying in your home directory), create two new directories using one command inside of the Assignment-3 directory, and name them Test1 and...
Unix/Linux The purpose of this lab is to practice the commands to manage and organize files and directories: How would one go about this? Thanks. Task 1: Preliminaries: 1) If you have not already done so, create a directory called bin under your HOME directory. 2) If you have not already made a copy (using ftp) of the file called famous.dat from the Assignment#1, do that now. 3) Make bin the active/working directory. Task 2: Perform all of the following...
COSC 3411 /ITAP 3411 Homework (UNIX Shell Commands) How would you ensure that all ordinary files created by you have rw-rw---- as default permissions? How would you sort in the background a file called "bad.txt", and place the results in a file called "sort.txt"? Archive the contents of your home directory (including any subdirectories) using tar. Compress the tar archive with gzip. Now extract their contents. Use the “find” command to locate in /docs and /usr/docs all files that Begin...
Vim and Unix Questions In a vim window, how do you set a tab to be two spaces wide? In a vim window, how do you, with a simple and single command, move the cursor to 5 lines below (don’t worry about the actual number of lines) and do nothing else? In a vim window, how do you, with a simple and single command, assuming your cursor is at the beginning of the word, delete the current word and do...