Where is the log directory in WSL?
There seems to be no such directory as /var/log/.
My aim is to run this *nix cron daily command:
0 0 * * * cat /dev/null > /var/mail/* /var/log/* 3 1 Answer
/var/log is at /var/log (at least in the version 16.04.3 LTS that I just installed in my Windows system).
$ ls -l /var/log
total 304
drwxr-xr-x 0 root root 512 Sep 22 18:15 apt
-rw-rw---- 1 root utmp 0 Sep 22 18:15 btmp
drwxr-xr-x 0 root root 512 Jul 19 01:29 dist-upgrade
-rw-r--r-- 1 root root 12794 Sep 22 18:15 dpkg.log
drwxr-xr-x 0 root root 512 Sep 22 18:13 fsck
-rw-rw-r-- 1 root utmp 292292 Jan 14 19:58 lastlog
drwxr-xr-x 0 root root 512 Aug 23 04:06 lxd
drwxr-x--- 0 root adm 512 Aug 1 04:46 unattended-upgrades
-rw-rw-r-- 1 root utmp 0 Sep 22 18:15 wtmpBut you won't be able to redirect your output to a list of files and subdirectories (as I told you in the comments).
You can empty all log files by the following cronjob (for root):
find /var/log -type f -exec truncate -s 0 {} \;