Bonjour,
Je remarque ce matin que la commande cp ne génère pas d’alerte si le fichier existe, donc écrasement direct.
Je ne sais si c’est récent et lié à kde ou bash.
Gérard
Écrasement sans notification
Vérifiez les alias dans votre fichier .bashrc
il doit y avoir
alias cp=“cp -i”
il n’y a pas, si je regarde le .bashrc de root j’ai
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
Est-il normal qu’il ne se trouve pas dans le .bashrc de l’utilisateur ?
Pour être clair :
sous root c’est par défaut
sous l’utilisateur, il faut l’ajouter à la main
Est-ce une nouveauté ou je ne l’avais jamais remarqué ? il est vrai que j’utilise habituellement cp en root
J’ai toujours eu ça d’office sur toutes les distrib.
Mais depuis quelque temps on a dans le répertoire /etc/profile.d un fichier dénommé aliasrc.sh qui est exécuté au login.
Je n’ai pas ce fichier
ls -l /etc/profile.d/
total 216
-rw-r--r-- 1 root root 209 28 sept. 03:00 00-modulepath.csh
-rw-r--r-- 1 root root 212 28 sept. 03:00 00-modulepath.sh
-rw-r--r-- 1 root root 4106 20 juil. 03:00 bash-color-prompt.sh
-rw-r--r-- 1 root root 747 17 juil. 03:00 bash_completion.sh
-rw-r--r-- 1 root root 200 18 juil. 03:00 colorgrep.csh
-rw-r--r-- 1 root root 205 18 juil. 03:00 colorgrep.sh
-rw-r--r-- 1 root root 1586 27 sept. 03:00 colorls.csh
-rw-r--r-- 1 root root 1431 27 sept. 03:00 colorls.sh
-rw-r--r-- 1 root root 162 20 juil. 03:00 colorxzgrep.csh
-rw-r--r-- 1 root root 183 20 juil. 03:00 colorxzgrep.sh
-rw-r--r-- 1 root root 216 18 juil. 03:00 colorzgrep.csh
-rw-r--r-- 1 root root 220 18 juil. 03:00 colorzgrep.sh
-rw-r--r-- 1 root root 254 4 sept. 03:00 composer.csh
-rw-r--r-- 1 root root 270 4 sept. 03:00 composer.sh
-rw-r--r-- 1 root root 83 20 juil. 03:00 csh.local
-rw-r--r-- 1 root root 674 17 juil. 03:00 debuginfod.csh
-rw-r--r-- 1 root root 601 17 juil. 03:00 debuginfod.sh
-rw-r--r-- 1 root root 951 14 août 12:48 flatpak.csh
-rw-r--r-- 1 root root 851 14 août 12:48 flatpak.sh
-rw-r--r-- 1 root root 1107 28 août 2019 gawk.csh
-rw-r--r-- 1 root root 757 28 août 2019 gawk.sh
-rw-r--r-- 1 root root 241 9 févr. 2024 gmpopenh264.sh
-rw-r--r-- 1 root root 58 3 sept. 03:00 gnome-ssh-askpass.csh
-rw-r--r-- 1 root root 70 3 sept. 03:00 gnome-ssh-askpass.sh
-rw-r--r-- 1 root root 21 18 juil. 03:00 gnupg2.csh
-rw-r--r-- 1 root root 22 18 juil. 03:00 gnupg2.sh
-rw-r--r-- 1 root root 249 25 sept. 03:00 kde.csh
-rw-r--r-- 1 root root 40 25 sept. 03:00 kde-openssh-askpass.csh
-rw-r--r-- 1 root root 53 25 sept. 03:00 kde-openssh-askpass.sh
-rw-r--r-- 1 root root 288 25 sept. 03:00 kde.sh
-rw-r--r-- 1 root root 3424 20 juil. 03:00 lang.csh
-rw-r--r-- 1 root root 3187 20 juil. 03:00 lang.sh
-rw-r--r-- 1 root root 500 12 août 03:00 less.csh
-rw-r--r-- 1 root root 253 12 août 03:00 less.sh
-rw-r--r-- 1 root root 99 18 juil. 03:00 mingw32.sh
-rw-r--r-- 1 root root 99 18 juil. 03:00 mingw64.sh
lrwxrwxrwx 1 root root 29 29 sept. 2021 modules.csh -> /etc/alternatives/modules.csh
lrwxrwxrwx 1 root root 28 29 sept. 2021 modules.sh -> /etc/alternatives/modules.sh
-rw-r--r-- 1 root root 122 18 juil. 03:00 nano-default-editor.csh
-rw-r--r-- 1 root root 120 18 juil. 03:00 nano-default-editor.sh
-rw-r--r-- 1 root root 1351 17 juil. 03:00 PackageKit.sh
-rw-r--r-- 1 root root 1001 19 juil. 03:00 qt.csh
-rw-r--r-- 1 root root 924 19 juil. 03:00 qt.sh
-rw-r--r-- 1 root root 81 20 juil. 03:00 sh.local
-rw-r--r-- 1 root root 849 24 août 03:00 snapd.sh
-rw-r--r-- 1 root root 3675 30 sept. 03:00 toolbox.sh
-rw-r--r-- 1 root root 967 16 sept. 03:00 vte.csh
-rw-r--r-- 1 root root 5058 16 sept. 03:00 vte.sh
-rw-r--r-- 1 root root 120 20 juil. 03:00 which2.csh
-rw-r--r-- 1 root root 379 20 juil. 03:00 which2.sh
-rw-r--r-- 1 root root 39 24 déc. 2023 wise2.csh
-rw-r--r-- 1 root root 39 24 déc. 2023 wise2.sh
- Modifié
Ben pas dur tu le crées. Voilà ce qu’il y a dans le mien:
alias rm="rm -i"
alias mv="mv -i"
alias l='ls -l'
alias la='ls -la'
alias cls=clear
D’après ce que je comprends ce répertoire regroupe les commandes autrefois dans le fichier profile qui était recopié dans le répertoire de chaque utilisateur et exécuté au login.
ça je sais faire, mais on est dans une beta, il s’agit donc de savoir si c’est un défaut ou normal