cd /Users/用户名/Documents/programs/SQLDeveloper.app/Contents/Resources/sqldeveloper
zsh sqldeveloper.sh
xuenhua’s 站点
cd /Users/用户名/Documents/programs/SQLDeveloper.app/Contents/Resources/sqldeveloper
zsh sqldeveloper.sh
1、sqlite3数据库位置
/private/var/folders/73/w1gsct654151mgqzf218d8qh0000gn/0/com.apple.dock.launchpad/db
2、读取db文件
sqlite3 dbfile
3、查看表
.tables
4、查看表结构
select * from sqlite_master where type=”table” and name=’apps’
5、Sql 操作
Mac OS X下的程序,通常不像Windows电脑下的那么复杂,什么注册表,DLL什么的,完全不用考虑。
要删除一个电脑程序之前,我先说一下安装一个程序后,通常生成了什么文件。
继续阅读“MacOS 卸载dmg app”在Unix和类Unix的操作系统之中,crontab命令常用于设置周期性被执行的指令,也可以理解为设置定时任务。
crontab中的定时任务有时候没有成功执行,什么原因呢?这时就需要去日志里去分析一下了,那该如何查看crontab的日志记录呢?
1. linux
看 /var/log/cron.log这个文件就可以,可以用tail -f /var/log/cron.log观察
2. unix
在 /var/spool/cron/tmp文件中,有croutXXX001864的tmp文件,tail 这些文件就可以看到正在执行的任务了。
3. mail任务
在 /var/spool/mail/root 文件中,有crontab执行日志的记录,用tail -f /var/spool/mail/root 即可查看最近的crontab执行情况。
1、启动模式BIOS改成UEFI,如果是支持双模式,要改成UEFI only,非常重要,否则无法检测到已安装的Win11,安装时没有“安装Ubuntu,与 Windows Boot Manager 共存 ”(Install ubuntu alongside windows)
2、windows 和 Ubuntu日期差8小时
Windows系统把主板BIOS的时间当做本地时间。
Ubuntu默认主板BIOS时间为GMT(格林尼治时间),而显示时间为BIOS的时间再加8个小时的当地时间。
timedatectl set-local-rtc 1
3、vi 箭头乱码
vi /etc/vim/vimrc.tiny
改为set nocompatible
set backspace=2
zip -e [archive] [file]
然后按提示设置密码
查看某文件的附加属性
$ xattr -l filename
去除某文件的附加属性
$ xattr -c filename
去除某目录下所有文件、目录的附加属性
$ xattr -c -r path
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo “Open With has been rebuilt, Finder will relaunch
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system-domainuser;
1、检查版本
mysql –version
MySQL output
mysql Ver 14.14 Distrib 5.7.16, for Linux (x86_64) using EditLine wrapper
Or output like this for MariaDB:
MariaDB output
mysql Ver 15.1 Distrib 5.5.52-MariaDB, for Linux (x86_64) using readline 5.1
2、停止服务
MySQL with:
sudosystemctl stop mysql
MariaDB wtih:
sudosystemctl stop mariadb
3、开启安全模式
sudo mysqld_safe –skip-grant-tables –skip-networking &
4、使用root免密码登录
mysql -uroot
MySQL prompt
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
MariaDB prompt
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]>
5、FLUSH PRIVILEGES;
非常关键,必须先执行这个,然后执行后面的语句才有效
6、修改密码
For MySQL 5.7.6 and newer as well as MariaDB 10.1.20 and newer, use the following command.
ALTER USER’root’@’localhost’IDENTIFIED BY ‘new_password’;
For MySQL 5.7.5 and older as well as MariaDB 10.1.20 and older, use:
SET PASSWORD FOR ‘root’@’localhost’=PASSWORD(‘new_password’);
或者
UPDATE mysql.user SET authentication_string =PASSWORD(‘new_password’)WHERE User =’root’AND Host =’localhost’;
7、重启
For MySQL, use:
sudokillcat/var/run/mysqld/mysqld.pid
For MariaDB, use:
sudokill/var/run/mariadb/mariadb.pid
Then, restart the service using systemctl.
For MySQL, use:
sudo systemctl start mysql
For MariaDB, use:
sudo systemctl start mariadb