Skip to main content
1 of 3
Marcus
  • 251
  • 1
  • 5

What does it mean \ in bash and in find?

I know that \ is an escape character, but when I write \ in bash I have something like that.

System-Product-Name:~$ \ > 

So bash wait for some instructions? When I use

System-Product-Name:~$ \ > ls 

It is working. But when I use

System-Product-Name:~$ cd Wideo \ > ls bash: cd: too many arguments 

So backslash is working like a pipe | ? I don't think so.

And when I use this command:

find . -name "FILENAME" -exec rm {} \; 

Why do I need to terminate it? I thought that command find finds proper files and in exec removes from a path that he found them. Without that I have information that -exec doesn't have any arguments, I don't get it. Why I can't just use

find . -name "FILENAME" -exec rm {} 

?

I have only that information about exec in man find "exec Show diagnostic information relating to -exec, -execdir, -ok and -okdir" Why do I need to terminate when I use exec? For example when I use

find . -name "FILENAME" 

I don't need to terminate.

Marcus
  • 251
  • 1
  • 5