Question

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

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

How do you delete them?
What would the Linux command(s) be?

Homework Answers

Answer #1
  • Linux command to find files whose names contain embedded spaces:

find has a -exec option, which allows you to specify a command to be executed for each file found. The executed command may also take arguments, any of which may be the string {} which will be replaced by the path of the found file. The command and its arguments are not subject to further expansion of shell patterns, so it's safe for {} to stand in for a file with a space in the name. For example,

$ find ~/Library -name '* *' -exec ls {} \;
  • Linux command to delete the file contain spaces:

The following command is required to copy or delete files with spaces in their name, for example:

$ cp "filename" /secure/location/
$ rm "filename"
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
In Linux please just type out command assuming files and directories are there Q21: display those...
In Linux please just type out command assuming files and directories are there Q21: display those line and line number do not contain “apple” from files whose name contains “file”. Q22: find all files, where file size is bigger than 100k and smaller 500k, and where filename ends with “.py” Q23: delete all directories with size larger than 10M or smaller than 1M. Q24: find out the five largest files or directories from current working directory, and output the result...
linux Using dpkg or apt, what would be the full command you would use to find...
linux Using dpkg or apt, what would be the full command you would use to find out if the python package was installed? This is tricky because Python’s actual package name is python3. $ If it is installed, what version is installed according to the dpkg or apt output? If it wasn’t installed, can you install it? What command would you use to do this? $ 2. Using dpkg, what would be the full command you would use to determine...
Can you find the file names of hard links and soft links to a file in...
Can you find the file names of hard links and soft links to a file in linux? If so, what command(s) do you need to use?
How would I go about answering these questions In linux. Please provide the correct linux command...
How would I go about answering these questions In linux. Please provide the correct linux command needed to answer these 4 questions 5. Display total words of each file under your root directory and subdirectories. 6. Change permission of every filename ends “.py” to — write read execute, group - read execute, other - execute 7. Find every line which contains “hello” from your file system, display both file name, line number. 8. Combine files with name “p3.py”, “p31.py”, “p32.py”,...
What command would you use to view the files and folders in the C:\windows directory? Use...
What command would you use to view the files and folders in the C:\windows directory? Use relative references. What command would you use to view only the directories in the C:\windows directory? Use relative references. Hint: Use a switch. What command would you use to view only the .com files in the C:\windows\system32 directory? Use relative references. What command would you use to create a directory called JUNK at the root. Use relative references. What command would you use to...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
5. Write a bash command that will display the name of every file on the Linux...
5. Write a bash command that will display the name of every file on the Linux system whose file contaent contains the string "doug.jones". The command must run in the background, must redirect standard error to /dev/null, and must redirect standard output to ~/out. 6. Write a bash command that will kill all of the even-numbered processes associated with your userid, and no other processes. 7. Write a bash command that will start the program /home/courses/140u-doug.jones/zombie_maker as a background process,...
Linux Operation SECTION 2 – File and Directory Permissions: FILE PERMISSIONS: What is the command used...
Linux Operation SECTION 2 – File and Directory Permissions: FILE PERMISSIONS: What is the command used to find out which user account you are logged into?      . This command may come in handy in the following exercises. Ensure you are in your home directory of the student1 account. Use the echo command with output redirection to create a file called labfile4 and put the following text in this file: “This is the first line of labfile4”. Using the symbolic notation...
What command discards the IP address? What command do you use to determine whether you can...
What command discards the IP address? What command do you use to determine whether you can reach another computer on the local network? Would this command work if the default gateway were down? When troubleshooting problems with resolving domain names to IP addresses, flushing the DNS cache can sometimes help so that the local computer must build the cache again. What is the command to flush the DNS cache? What command would you use to display information about name resolutions...
Linux commands in terminal What processes are running? In the previous task ("Command Based") you were...
Linux commands in terminal What processes are running? In the previous task ("Command Based") you were already familiar with the command "ps" which shows some or all of the processes that are running. When you run "ps", you start a new process and you can see the actual process in the output. Later in this task you will use "ps" more. The "top" command also shows an overview of the processes that exist on the system but it the overview...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT