linux_notes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux_notes [2021/09/30 15:56] – [remove large directories] raju | linux_notes [2023/09/24 15:33] (current) – [what is my OS?] raju | ||
---|---|---|---|
Line 2: | Line 2: | ||
* [[add numbers on the command line]] | * [[add numbers on the command line]] | ||
* [[du on month end dates]] | * [[du on month end dates]] | ||
+ | * [[change the default shell]] | ||
+ | * [[Which shell am I using | Which shell am I using?]] | ||
+ | * [[Difference between SHELL and 0 | What is the difference between \$SHELL and \$0?]] | ||
+ | ==== what is my OS? ==== | ||
+ | < | ||
+ | awk -F= ' | ||
+ | </ | ||
+ | |||
+ | Sample run: | ||
+ | < | ||
+ | % cat / | ||
+ | PRETTY_NAME=" | ||
+ | NAME=" | ||
+ | VERSION_ID=" | ||
+ | VERSION=" | ||
+ | VERSION_CODENAME=bookworm | ||
+ | ID=debian | ||
+ | HOME_URL=" | ||
+ | SUPPORT_URL=" | ||
+ | BUG_REPORT_URL=" | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | % awk -F= ' | ||
+ | debian | ||
+ | </ | ||
+ | |||
+ | Ref: | ||
+ | * I came across it in https:// | ||
+ | |||
+ | ==== last reboot times ==== | ||
+ | < | ||
+ | last reboot --time-format full | ||
+ | </ | ||
+ | |||
+ | Sample run | ||
+ | < | ||
+ | % last reboot --time-format full | ||
+ | reboot | ||
+ | reboot | ||
+ | reboot | ||
+ | reboot | ||
+ | reboot | ||
+ | reboot | ||
+ | reboot | ||
+ | reboot | ||
+ | reboot | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | {{tag> | ||
+ | ==== ls and mv ==== | ||
+ | Sample command | ||
+ | < | ||
+ | ls -rt *.txt | tail -n5 | tr ' | ||
+ | </ | ||
+ | |||
+ | Notes: | ||
+ | * Works even if there are spaces in the filenames. Compare this with < | ||
+ | mv `ls -rt *.txt | tail -n5` x1 | ||
+ | </ | ||
+ | * Does not work if the filenames contain newline characters. | ||
+ | |||
+ | Ref:- https:// | ||
+ | |||
+ | Related commands | ||
+ | < | ||
+ | ls -rt *.txt | tail -n5 | tr ' | ||
+ | </ | ||
==== remove large directories ==== | ==== remove large directories ==== | ||
Line 27: | Line 96: | ||
Found it in | https:// | Found it in | https:// | ||
+ | |||
+ | ==== tput: unknown terminal " | ||
+ | When I moved my miniconda3 installation from / | ||
+ | < | ||
+ | tput: unknown terminal " | ||
+ | </ | ||
+ | |||
+ | To fix it, I did | ||
+ | < | ||
+ | conda install --force-reinstall ncurses | ||
+ | </ | ||
+ | |||
+ | It turns out that the --fore-reinstall option was important since simply doing | ||
+ | < | ||
+ | conda install ncurses | ||
+ | </ | ||
+ | was not installing ncurses as it was already uptodate. | ||
+ | |||
+ | Ref:- https:// | ||
linux_notes.txt · Last modified: 2023/09/24 15:33 by raju