Question

How to copy all non hidden files in your current directory with names not beginning with...

How to copy all non hidden files in your current directory with names not beginning with a digit to other directory?

Homework Answers

Answer #1

Here we will use the cp command to copy all non-hidden files. and we will copy only those files which are not beginning with a digit and such file we will identify with the help of regex [^0-9]*  

In this regex  ^ symbol in regex is like a not. [^0-9] this indicates not any digit and * indicates all. so we are copying all files which are not starting with a digit by using the following command.

cp [^0-9]* path_of_dir/


path_of_dir is a path where you want to copy all these files.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a short script filecount.sh that counts the total number of files in the current directory...
Write a short script filecount.sh that counts the total number of files in the current directory with names matching a specified pattern, and print out this number to screen. For example, bash filecount.sh *.txt should return the number of .txt files found in the current directory, while bash filecount.sh p*.txt should return the number of text files with names starting with p.
Using a PowerShell cmdlet (non-alias), pipe the contents of your current directory into a Where-Object search...
Using a PowerShell cmdlet (non-alias), pipe the contents of your current directory into a Where-Object search to find a file or group of files by partial or full filename. (Suggestion: Use part or all of a filename to filter everything else out of a directory listing. It’s much easier to test by looking for a file that really exists) POWERSHELL PLEASE!
Write UNIX commands to perform the following tasks. Each task must use exactly one line of...
Write UNIX commands to perform the following tasks. Each task must use exactly one line of command. Unless stated otherwise, all files are assumed to be at your current working directory. a) (10 points) Print your current working directory into a file named file1 b) (10 points) 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. c) (15 points) Copy...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of the separation is that they are not displayed by the default version of the ls command)                         a. the prefix "rc" (rc.filename)               c. the extension .cfig                         b. a dot (.) at the beginning                    d. by having the SUID bit set 2. The IP address which is reserved for local loopback (equivalent to "localhost") is:                         a. 255.255.255.0                                   c. 192.168.70.1...
Lab of operating system: please use the linux server please so all the commands used and...
Lab of operating system: please use the linux server please so all the commands used and the output PROBLEM 1: Create a file and name it f1 • Cerate a directory and name it d1 • Move f1 to d1 • Create a directory and name it d2 • Move d1 to d2 • Check if d1 is inside d2 • Check if f1 is inside d1 • While your (Current Working Directory) CWD is d1, move back f1 to...
How are current assets different from non-current assets? Can you provide an example of each? URGENT:...
How are current assets different from non-current assets? Can you provide an example of each? URGENT: NEED ANSWER ASAP PLEASE RESPOND WITH COPY AND PASTE, NOT ATTACHMENT USE ORIGINAL CONTENT NOT USED BEFORE ON CHEGG PLEASE ANSWER THROUGHLY TO ALL ANSWER TO BEST ABILITES ORIGINAL SOURCE NEVER USED BEFORE!!!
The Ice Chalet offers dozens of different beginning ice-skating classes. All of the class names are...
The Ice Chalet offers dozens of different beginning ice-skating classes. All of the class names are put into a bucket. The 5 P.M., Monday night, ages 8 to 12, beginning ice-skating class was picked. In that class were 64 girls and 16 boys. Suppose that we are interested in the true proportion of girls, ages 8 to 12, in all beginning ice-skating classes at the Ice Chalet. Assume that the children in the selected class are a random sample of...
This assignment asks you to develop a basic File Transfer Protocol (FTP) application that transmits files...
This assignment asks you to develop a basic File Transfer Protocol (FTP) application that transmits files between a client and a server using Python.Your programs should implement four FTP commands: (1) change directory(cd), (2) list directory content (ls), (3) copy a file from client to a server (put) and (4) copy a file from a server to a client (get). The project will be completed in two phases. In the first phase, all students will implement two versions of the...
Bash script Suppose you are working as a prof or TA and your students have an...
Bash script Suppose you are working as a prof or TA and your students have an assignment which requires them each to hand in exactly one file. You've got a directory with all of the submitted files in it, and no other files. You're also lucky enough to have a script that will do all the work of marking a submission; it will take the name of a submission file as its only parameter and will print out a single...
Reflective Journal Assignment Reflect on your Current Personal Experiences explain How you as a beginning nurse...
Reflective Journal Assignment Reflect on your Current Personal Experiences explain How you as a beginning nurse see you fitting in relational practice. Identify at least three areas (e.g., empathetic skill, conflict management, assertive communication, and personal communication etc.) you have been successful in your personal life and provide examples and reference the textbook for this course.