25-03-2025

This commit is contained in:
2025-03-25 15:52:48 +01:00
parent 259b9c6a24
commit 011cfcba40
64 changed files with 2993 additions and 45 deletions

View File

@@ -85,7 +85,7 @@ Créer une .plist:
La copier dans `$HOME/Library/LaunchAgent`
```bash
cp com.update-motd.plist /Users/bruno/Library/LaunchAgents/
cp com.bruno21.update-motd.plist /Users/bruno/Library/LaunchAgents/
```
puis la charger:
@@ -109,6 +109,24 @@ launchctl load -w /Users/bruno/Library/LaunchAgents/com.bruno21.update-motd.plis
```bash
cp update-motd.sh ${HOME}/.local/bin/
```
```bash
# test
~/.local/bin
➜ ./update-motd.sh
./update-motd.sh: line 46: /etc/motd: Permission denied
# si erreur: /Users/bruno/.local/bin/update-motd.sh: line 46: /etc/motd: Permission denied
sudo touch /etc/motd
sudo chmod 666 /etc/motd
```
https://apple.stackexchange.com/questions/392789/launchctl-plist-has-a-stderr-that-talks-about-how-getcwd-operation-not-permitted?newreg=7f5230c960a74d99b1105a9f66d9cfa2
https://rakhesh.com/mac/macos-launchctl-commands/

View File

@@ -26,6 +26,19 @@ You have mail in /var/mail/bruno
Taper d 1 (delete) pour supprimer le message
```bash
$ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/bruno": 3 messages 3 new
>N 1 MAILER-DAEMON@airboo Sat Aug 3 09:37 75/2510 "Undelivered Mail Returned to Sender"
N 2 MAILER-DAEMON@airboo Wed Aug 21 18:25 75/2510 "Undelivered Mail Returned to Sender"
N 3 MAILER-DAEMON@airboo Wed Aug 21 18:25 75/2510 "Undelivered Mail Returned to Sender"
d 1 # (delete) pour supprimer le message
d * # pour supprimer tous les messages
q # pour quitter
```
**Solution 2**
```bash