**Main question:**

I am writing a script to perform a backup. I make a list of files in the following way:

```
LISTOFFILES=$(find ~ \( -name '*.[pP][dD][fF]' -o -name '*.[oO][dD][tT]' \))

```

The variable `LISTOFFILES` stores more or less something like:

```
/home/user/file1.pdf /home/user/file2.odt /home/user/Python Tutorial.pdf

```

My next step is:

```
tar cvf backup.tar $LISTOFFILES

```

Bash response is:

```
/home/user/file1.pdf
/home/user/file2.odt
/home/user/Python: Cannot stat: No such file or directory
tar: Tutorial.pdf

```

I understand that Bash assumes that `Python` and `Tutorial.pdf` are different files.

Is there a way to do a list of files with backslash included with `find` or should I change to use `ls` with pipes?

I'd like read your tips and advices.

**My other question:**

*The answer to this question is not really important, but one tip could help*

How to list files only with the file name without the file path?

For example: `file` instead of `/home/user/file`.

I've trying with `find` command with `prune` and `path` options, but I have not succeeded.