Level 73
Use touch to create the files.
sudo mkdir /var/log/peter.com && touch /var/log/peter.com/access.log && touch /var/log/peter.com/error.log
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi everybod, in my ubuntu VPS I'm trying to get three commands to run after each other using &&, what I do is create a folder and inside that folder I create two log files using nano, this however doesn't create the log files, only the mai folder, after running the bellow command it tells me file is not writtable and to save into buffer, so I just cancel the operation with no log files created... This are the commands:
sudo mkdir /var/log/peter.com && nano /var/log/peter.com/access.log && nano /var/log/peter.com/error.log
Use touch to create the files.
sudo mkdir /var/log/peter.com && touch /var/log/peter.com/access.log && touch /var/log/peter.com/error.log
Please or to participate in this conversation.