helpful_ubuntu_commands
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
helpful_ubuntu_commands [2025/06/14 06:35] – mike | helpful_ubuntu_commands [2025/08/20 09:50] (current) – mike | ||
---|---|---|---|
Line 24: | Line 24: | ||
=== Changing default editor for visudo === | === Changing default editor for visudo === | ||
sudo update-alternatives --config editor | sudo update-alternatives --config editor | ||
+ | |||
+ | If visudo complains about a missing defaults.vim file, it can be fixed thusly: | ||
+ | sudo touch ~root/.exrc | ||
| | ||
=== Disable GUI screen lock === | === Disable GUI screen lock === | ||
Line 43: | Line 46: | ||
du -a /dir/ | sort -n -r | head -n 20 (replace 20 with the # of lines you wish to have returned) | du -a /dir/ | sort -n -r | head -n 20 (replace 20 with the # of lines you wish to have returned) | ||
+ | === Find the oldest file in a directory (and it's subdirectories) === | ||
+ | find . -type f -printf '%T+ %p\n' | sort | head -n 1 | ||
+ | | ||
=== Disable colors in the vi editor by default === | === Disable colors in the vi editor by default === | ||
Create (or edit, if it exists) ~/.vimrc; into this file add the command syntax off, and save the file. | Create (or edit, if it exists) ~/.vimrc; into this file add the command syntax off, and save the file. |
helpful_ubuntu_commands.1749908117.txt.gz · Last modified: by mike