yeah I use it for mainly thumb drives so its always just a simple xcopy a b type thing where most of the time i type xc and then the arrow up key to get to the destination drive I want. however yours is probably much more robust. I just took a command I frequently used and made it into a simple function for my use.
Tested and working…thanks ![]()
@thefrog, for graphical you can use these.
Create file:
sudo nano /etc/udev/rules.d/99-usb-sync.rules
Add rule:
ACTION=="add", SUBSYSTEMS=="usb", ENV{UDISKS_MOUNT_OPTIONS_DEFAULTS}="sync"
Reload udev rules:
sudo udevadm control --reload-rules (or --reload)
If it’s not reloading you need to reboot, i chose to reboot because --reload didn’t work. Now it’s working great.
thanks for this I updated the function in my bashrc
Added a few minor things but not much else
https://dpaste.com/6E669HWW4
I tried to balance my .bashrc config to keep it minimal, yet practical for my needs as well. I could probably get rid of a few things, but I like what I’ve created so far over the years.
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
# ===== Prompt =====
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# ===== Bash completion =====
[[ -r "/usr/share/bash-completion/bash_completion" ]] && . "/usr/share/bash-completion/bash_completion"
# ===== Aliases =====
alias ls='ls --color=auto'
alias ll='ls -lha --group-directories-first'
alias la='ls -A'
alias l='ls -CF'
alias grep='grep --color=auto'
alias diff='diff --color=auto'
alias ip='ip --color=auto'
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -I'
alias df='df -h'
alias du='du -h'
alias free='free -h'
# ===== Functions =====
ren() {
perl-rename '
s/^(\d)\b/0$1/;
s/^(\d{2})[.\s-]*/$1. /;
' *
}
# ===== Environment =====
export EDITOR="nano"
# ===== History =====
export HISTSIZE=10000
export HISTFILESIZE=20000
export HISTCONTROL=ignoreboth
shopt -s histappend
shopt -s checkwinsize
shopt -s cdspell
# Save history after every command
PROMPT_COMMAND="history -a${PROMPT_COMMAND:+; $PROMPT_COMMAND}"
# ===== Less / Man page colors =====
export LESS="-R"
export MANPAGER="bat -l man -p"
# ===== Startup =====
fastfetch
Why not put all the aliases in .bash_aliases. This will keep the .bashrc minimal.
And why do you have in your .bashrc
shopt -s histappend
shopt -s checkwinsize
shopt -s cdspell