linux commands

Find and delete files greater than a given size from the Linux command line
sudo -u root sh -c 'cd ./snapd/cache/ && find . -size +100M -exec rm -rf {} \;'
sudo cd mysql
sudo: cd: command not found
sudo: "cd" is a shell built-in command, it cannot be run directly.
sudo: the -s option may be used to run a privileged shell.
sudo: the -D option may be used to run a command in a specific directory.


sudo -u root sh -c 'cd mysql && ls -lct'

 

 

sudo -u root sh -c 'cd mysql && rm -rf *log*';
sudo -u root sh -c 'cd mysql && ls -lct'

 

posted @ 2022-12-04 19:41  FredGrit  阅读(107)  评论(0编辑  收藏  举报