All Questions
Tagged with synchronization bash
8
questions
2
votes
2
answers
245
views
Bash frequently fails to redirect stdout to a file (from cat)
I commonly append to text files using cat:
cat >> FILE
I use an alias to avoid accidentally overwriting the file (with a single >):
alias a='cat >>'
Enter changes the line and Ctrl + ...
1
vote
1
answer
411
views
How to sync two folders with the same file names but different extensions
Is there a means of using rsync to sync two folders?
I would like to shoot photos in JPG and RAW. Since viewing JPGs is much quicker than opening up RAWs, I'd like to do culling in the JPG folder and ...
1
vote
1
answer
235
views
Signal lost for Bash background process
When I spawn a background job in Bash 5.1 and immediately send it a signal, this signals seems to get lost. Short demo:
$ cat simple.cc
#include <signal.h>
#include <unistd.h>
#include &...
2
votes
2
answers
793
views
Separate bashrc file for ssh sessions to avoid Unison Errors
Recently my Unison started throwing up some strange error whenever I tried to sync between my laptop and my PC. I realized that I had added a line in bashrc that would print my pending tasks whenever ...
28
votes
2
answers
14k
views
How to sync terminal session command history in bash?
I've
tried to search in ~/.bash_history for my recent commands while in a
terminal session but they just weren't there. I guess this is because I
have multiple terminal sessions open.
Is there a ...
2
votes
2
answers
1k
views
How to have a chroot system mount shared with its host?
Say I chrooted into ~/myroot with its /mnt being bind-mounted from the host's /mnt. Now (from within the chroot environment) I want to e.g. mount /dev/something /mnt/something such that not only the ...
23
votes
2
answers
53k
views
Move files and delete directories with rsync?
Recently I needed to delete a large number of files (over 1 million) and I read that doing:
rsync -av --delete `mktemp -d`/ ~/source && rmdir ~/source
Was one of the most optimized ways to ...
19
votes
4
answers
11k
views
sharing or synchronizing history between Zsh and Bash
I often find myself switching between Bash and Zsh, and using the history search functionality to recover a command.
However, since Bash and Zsh have different history files, I often find that the ...