Last active
November 6, 2018 18:27
-
-
Save ptitb/9a5e58ee78c9cc00e9d61dda419aebd9 to your computer and use it in GitHub Desktop.
SSH Commands
This file contains 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
// Generate ssh key | |
ssh-keygen -t rsa | |
// Copy public key | |
cat ~/.ssh/id_rsa.pub | |
// Apply online patch | |
curl https://www.drupal.org/files/issues/core-views_row_class_number_missing-2669394-6-D8.patch | patch -p1 | |
// SCP all files including hidden from current directory | |
scp -rp . user@domain:path | |
// rsync -avz * | |
// Move all files in current directory one level up | |
mv * .[^.]* .. | |
// Clone GIT repo and remove git history | |
// http://stackoverflow.com/questions/11497457/git-clone-without-git-directory | |
git clone --depth=1 --branch=master git://someserver/somerepo dirformynewrepo | |
rm -rf !$/.git | |
// Remove files from git after being commited before and are now in gitignore | |
git ls-files -z --ignored --exclude-standard | xargs -0 git rm -r --cached | |
// List files edited on certain date | |
find /path/to/dir -newermt "yyyy-mm-dd" | |
// find files with expression | |
find -iname '*.php' -print0 | xargs -0 egrep -in 'WATJEWILTVINDEN' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment