- 新しい順
- 投票が多い順
- コメントが多い順
Hello.
Looking at the delete command, it appears to be using the root user with "sudo".
Are you saying that you can't delete the root user even if you are using the root user?
sudo su -
sudo find /opt/bitnami/mysql/data//mysqld.log-.gz -type file -exec rm {} ;
The syntax of your find
command is incorrect, the path you are searching needs to be separate to the filename.
What's the directory your SQL log files are in (that you want to delete)? From the above my best guess is that it's something like /opt/bitnami/mysql/data/
, yes?
And what's the naming format of the files you want to delete? From the command above it looks like you're looking for a file called precisely mysqld.log-.gz
which sounds unlikely.
My guess is that your logs are called something like mysqld.log-1.gz
, mysqld.log-2.gz
, and so on, is that right?
If so then you need a ?
as a wildcard in your find
command, something like:
sudo find /opt/bitnami/mysql/data/ -name mysqld.log-?.gz -type f
If the output from this is a list of the files you want to delete then run it again, with -exec rm {} ;\
appended to it.
Alternately, if your logs are called something like mysqld.log-20230808.gz
, mysqld.log-20230801.gz
, and so on, in that case replace your single question-mark wildcard with an asterisk, and then run:
sudo find /opt/bitnami/mysql/data/ -name mysqld.log-*.gz -type f
Check it comes back with the files that you want to delete. All good? Then run it again, with -exec rm {} ;\
appended to it.
Thanks for your input. The issue at hand was the permissions issue that did not allow me to delete the old log files in the /opt/bitnami/mysql/data directory. I have since resolved that issue and deleted the old files, gained back 20% available space in the / directory. That was enough to start the mysql database and recreate the wp_options table which was filling up the file system.
I was trying to delete the old gziped log files in the data directory. I was able to chmod and fix the issue, however yesterday it didn't seem to work.