1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
OLEGan [10]
3 years ago
12

. How do you find and remove files whose names contain embedded spaces? What would the Linux command(s) be?

Computers and Technology
1 answer:
zloy xaker [14]3 years ago
8 0

Answer:

The Linux command is <em>find</em><em>.</em>

Explanation:

The Linux command <em>find</em> suffices for finding and removing files whose names contain embedded spaces.

The command <em>find</em> supports <em>tests</em> of different kinds and predefined (and user-defined) <em>actions</em> in conjunction like that one looking for files with embedded spaces and then delete them.

We can achieve this using the following piece of code (as example):

<em>find . -regex '.* +.*' -delete</em>

The command <em>find</em> will look for files in the current working directory ( . ), execute the test <em>-regex</em>, to evaluate files in the <em>current directory</em> using the <em>case-sensitive regular expression test</em> (<em>regex</em>) (it could be also <em>-iregex</em>) that evaluates those files having names with <em>one or more</em> embedded spaces ( +)  between <em>zero or more</em> characters before (.*) and after (.*) of these embedded space(s) ( +).  

<em>Look carefully</em> that <em>one or more</em> embedded spaces is (are) represented in <em>regular expressions</em> using <em>a space </em>before the <em>metacharacter</em> (+),  and characters are represented using the metacharacter (.) before (*), that is, (.*)

In other words, the quantifier (+) represents <em>one or more</em> occurrences (or matches) and quantifier metacharacter (*) zero or more times cases for that evaluation.

So, after testing all files available in the current directory with -regex test, <em>find</em> will execute the action -delete for all files matching the result of such an evaluation (and finally obtaining what we are looking for).

The command <em>find</em> has several other tests (-name, -iname, -ctime, and many more) that can be used with logical operators (-and, -or, -not), some predefined actions like -delete (aforementioned), -ls (list), -print and -quit, and also offers possibilities for user-defined actions, as mentioned before.

You might be interested in
A(n) ____________ for a computer program is a set of steps that explains how to begin with known information specified in a prob
Viefleur [7K]

Answer:

​algorithm

Explanation:

A(n) ​algorithm for a computer program is a set of steps that explains how to begin with known information specified in a problem statement and how to manipulate that information to arrive at a solution.​

4 0
3 years ago
4) What is a desktop?​
DaniilM [7]
A desktop computer is a personal computer designed for regular use at a single location on or near a desk due to its size and power requirements.
3 0
1 year ago
Guys i keep trying to get in touch with brainly but it says "your request could not be submitted" Can someone please help me ?
Ann [662]
Sure what is your question? It also happened to me too
What grade are you in
7 0
2 years ago
Read 2 more answers
Why are computers assigned IP addresses?
ladessa [460]

Answer:An Internet Protocol address (IP address) is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. An IP address serves two main functions: host or network interface identification and location addressing.

6 0
3 years ago
40 POINTS IF YOu ANSWER FOR EACH STEP.
NISA [10]

Answer:

4 beeps indicate a Memory Read / Write failure. Try re-seating the Memory module by removing and reinserting it in the slot. This could mean it could've just jiggled loose after a while or dust, there could be a hundred other problems but those are the two most common.n

Explanation:

8 0
3 years ago
Other questions:
  • Which statement is a good reason for backing up your data to the cloud?
    7·2 answers
  • A personal business letter is a letter that is ____.
    13·1 answer
  • When a crash results in property damages of any amount, the driver must notify:
    10·1 answer
  • Help me for this question
    8·1 answer
  • Convert the ProjectedRaises class to an interactive application named ProjectedRaisesInteractive. Instead of assigning values to
    15·1 answer
  • The market is in <br> until the price of goods reflects equal supply and demand.
    10·1 answer
  • If a variable uses more than one byte of memory, for pointer purposes its address is: Group of answer choices the address of the
    12·1 answer
  • Question #2
    5·1 answer
  • Commercials are short media advertising that persuades a consumer to buy/use their product/service?
    13·2 answers
  • Which symbol shows an input?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!