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
The following is true about SPAM ________.
aev [14]

Answer:

a, c, and d.

Explanation:

Let's examine these options:

a -> Spamming can be used to obtain information about the individuals. Those emails can contain links that try to reveal your sensitive information. They can also contain viruses directly like in the some attached folder. Another usage of spamming is just to advertise some products.

c -> Spam emails are not something you requested for. They are just sent to email addresses in huge amounts.

d -> As mentioned earlier, they can be used to obtain personal information like password, credit card information.

8 0
3 years ago
We have to calculate the percentage of marks obtained in three subjects (each out of 100) by student A and in four subjects (eac
MAXImum [283]

Answer:

abstract class Mark  //Creating an Abstract class{

abstract double getPercentage();}

class A extends Mark{

double result;

A( int val1, int val2, int val3){

 result=(val1+val2+val3)/3;}

double getPercentage(){

 return result;}}

class B extends Mark{

double result;

B(int val1, int val2, int val3, int val4){

 result=(val1+val2+val3+val4)/4;}

double getPercentage(){

 return result;}}

class Main{

public static void main(String args[]){

 //class A Object

 Mark obj_1=new A(10,20,30);

 System.out.println(obj_1.getPercentage());

 //class B Object

 Mark obj_2=new B(10,20,38,46);

 System.out.println(obj_2.getPercentage());}}

6 0
3 years ago
Which cell has no nucleus ?​
Llana [10]
The answer is Prokaryotic Cell
5 0
3 years ago
Read 2 more answers
A ______________ is a document created when planning resource management to help promote teamwork and clarify team communication
Ivahew [28]

Answer: team contract

Explanation:

A team contract is a document created when planning resource management to help promote teamwork and clarify team communications. This document helps to sort out which are the most important matters and needs more importance to be given.

It help to guide and give proper management of resources for a project or an organization. It also ensures that the members of the team abide by its set of rules defined within the team contract.

5 0
2 years ago
How does form get its power natural gas
lana [24]

Answer:

because it does

Explanation:

7 0
3 years ago
Other questions:
  • The _____ command icon looks like a small clipboard with a page attached.
    6·1 answer
  • With a _____ network connection, the computers and other devices on the network are physically connected via cabling to the netw
    13·1 answer
  • In terms of object-oriented programming,after class is defined,________ can be created for that class.
    15·1 answer
  • Explain three applications of data mining
    14·1 answer
  • What are advantages of using document templates?
    13·2 answers
  • Select the correct answer.
    7·2 answers
  • Please Helpppp Me User Interface Design ensures that the interface has elements that are easy to ________________. (Choose all t
    8·1 answer
  • Which of the following statements best reflects the pros and cons of overtime potential for a line installer or repairer?
    15·1 answer
  • Fill this blanks with the given words​
    6·1 answer
  • ____ Is an Internet service that allows users to send and receive short text messages In real time.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!