# More about files
{id: files-more}

## Exercise: Create a counter
{id: exercise-create-counter2}

```
Each time I run the script I want to get a higher number.
```


## Exercise: Create multiple counters
{id: exercise-create-multiple-counter}

```
Create multiple counters separated by newlines
I run the script like this:   counter.pl 3
This will increment the counter #3 by one and print the value.
```


## Exercises: List old logfiles
{id: exercise-list-old-logfiles}

```
List all the logfiles in the current directory that are older than 3 days
```

```
List all the log files in this directory and subdirectories that
are more than 3 days old.
```



## Solution: Create a counter
{id: solution-create-counter2}
![](examples/files-perl/counter.pl)


## Solution: Create multiple counters
{id: solution-create-multiple-counter}
![](examples/files-perl/multiple_counter.pl)


## Solutions: List old logfiles
{id: solution-list-old-logfiles}
![](examples/shell/logfiles_older_than3days.txt)
![](examples/shell/list_old_log_files.pl)







