Create local folder symlink to Apache
Let's say you have a folder somewhere on your local machine and you want Apache to serve your website from this folder. First, remove the html directory with: sudo rm -rf /var/www/html Next, create the symlink: sudo ln -s /home/USERNAME/FOLDER_
Delete files older than x many days Ubuntu Terminal
To delete files older than 'x' many days, you can execute the following command in the terminal: find /path/to/ -type f -mtime +7 -name '*.zip' -execdir rm -- '{}' \; The type -f indicates that you would only like to delete files.
Add text to another file / concatenate Ubuntu
If you'd like to add text from one file to another (concatenate two text files) the run the following command: cat file1 | cat >> file2 This will output the contents of file1 and pipe the output to file2.
Linux - remove files and folders older than x days
When running cleanup scripts and you'd like to delete files and folders older than x days you can use the following commands: For zip files: find /path/to/your/folder/ -mtime +3 -name '*.zip' -execdir rm -- '{}' \; For all files and