Archive for the ‘command’ Category.
I have really become addicted to using the -Qo flag of pacman. This is especially true with the various times I have had to do the painful /usr/lib move, as you need to figure out which package owns the files that are left in /lib. It’s pretty easy, really
$ pacman -Qo /usr/lib/libQtCore.so
/usr/lib/libQtCore.so is owned by qt 4.8.2-3
Very nice. And, even better, I found out you can just omit the full path if it is an executable in your path:
$ pacman -Qo hostname
/usr/bin/hostname is owned by inetutils 1.9.1-4
Thanks to Allan McCrae’s blog post on his switch to systemd, I found out about the archlinux(7) man page, which is quite useful:
archlinux – basic configuration
Overview of the basic configuration of Arch Linux.
Arch Linux exposes the user to the system without hiding any details. This manpage
gives a brief overview of the configuration files that should be set up on a fresh
Give it a try!
Interesting forum topic about saving the bash history. I guess there is currently a “bug” where if you close the terminal window, rather than exit the shell, bash doesn’t save the history file, like it normally does.
A workaround is to add the ‘history -a’ command to your prompt command. The -a option tells bash to append any new history lines to the history file, thus you append to it every command. This has the side effect of having every opened terminal inherit the current history of all your bash shells, as well as save the commands from all of them into a central place. I like this idea, as I have always been bothered by the fact that the history is only from the last closed bash shell, losing any interesting commands I had previously.
Another option discussed is the -n option, which tells bash to read any new commands added to the history. This essentially means that all opened terminal windows share a history. So here’s the line to add to your .bashrc:
export PROMPT_COMMAND="history -a; history -n; $PROMPT_COMMAND"
I’ll have to try both.
[SOLVED] Terminal doesn’t remember last commands
nice hint from the Season 3, episode 1 Tuxradar podcast – logger. You can add notes to the system log, even as a user. So:
$ logger added a new kernel
$ sudo tail /var/log/messages.log
Feb 24 21:45:41 localhost kernel: usb 3-2.1: new full speed USB device using uhci_hcd and address 46
Feb 24 21:45:41 localhost kernel: hub 3-2.1:1.0: USB hub found
Feb 24 21:45:41 localhost kernel: hub 3-2.1:1.0: 4 ports detected
Feb 24 21:45:42 localhost kernel: usb 3-2.1.1: new full speed USB device using uhci_hcd and address 47
Feb 24 21:55:20 localhost -- MARK --
Feb 24 22:06:12 localhost jdarnold: added a new kernel
That’s pretty cool. As I showed, I just added a note that I have a new kernel now, so if there’s any question about compatibility, I’ll know!
UNIX man pages : logger (1).