Last active
October 25, 2021 13:45
-
-
Save adujardin/edb1c51e313ab66167367a3904da149f to your computer and use it in GitHub Desktop.
Memo for random useful bash commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Search recursively text in files | |
grep -rIn "My text" ../path/to/folder/ | |
# Replace recursively matching string in all text files | |
find ../path/to/folder/ -type f -exec sed -i 's/My string to replace/My new string/g' {} + | |
# Git merge without issues from EOL (win <-> unix for instance) | |
git merge -s recursive -Xignore-space-at-eol my_branch | |
# ccmake setup ubuntu | |
sudo apt-get install cmake-curses-gui | |
# Copy with progress bar https://unix.stackexchange.com/a/65222/217235 | |
rsync --info=progress2 source dest | |
cheat() { #https://news.ycombinator.com/item?id=22125306 | |
curl "http://cheat.sh/$1" | |
} | |
# Setup Qemu (x86 -> aarch64) | |
sudo apt-get install qemu binfmt-support qemu-user-static # Install the qemu packages | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes # This step will execute the registering scripts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment