![linux filewatcher remove spaces from filename linux filewatcher remove spaces from filename](https://deepitp5.files.wordpress.com/2016/12/w4.png)
Well, you can add backslashes as mentioned before and below is the correct command using that.īut as you can see, not only it is time consuming, but since we are not that used to seeing backslashes on file names, it can be really confusing as well. In fact, if you carefully look at the output, you can see that command-line has treated the file name as three different files due to the three spaces that are present in the file name.
![linux filewatcher remove spaces from filename linux filewatcher remove spaces from filename](https://www.cyberpratibha.com/wp-content/uploads/2019/06/1-open-search-box-1024x576.jpg)
Note: I am running ‘cp’ with ‘sudo’ (administrative) privileges. If I enter the below command then I will receive an error saying that there exists no such file/directory. And unless you are aware of this simple trick, it can be quite frustrating, because for each space you have to add a backslash ( \ ) when using the command-line.įor example, let us assume that I have a file called Data backup 2.tar on my Home folder, and that I need to copy it to /media/pen location using the ‘cp’ command. That said however, when dealing with files under command-line, say that you had to use it to backup your data because the desktop session was not working anymore, it is pretty common that one should come across files that contain spaces in their names. Most people that use the GNU/Linux operating system do not like to deal with the command-line at all, though having a basic understanding of it (such as memorizing commands for mounting devices and copying files for instance) can come in real handy sometimes.