-
Notifications
You must be signed in to change notification settings - Fork 0
Useful code snippets.
seanb80 edited this page Apr 19, 2017
·
7 revisions
Mount Owl on Emu
sudo mount -t cifs -o username=USERNAME //owl.fish.washington.edu/web ~/Documents/owl/
Recursively change permissions of all subdirectories in a directory.
find /path/to/base/dir -type d -exec chmod 755 {} +
Copy files matching some pattern, including subdirectories
find src/ -type f -name "*.suffix" | xargs -i cp {} dst/
Hide Standard Output and direct it towards a file (Useful for hiding things in R notebooks to avoid pagebreaking lengths)
command &> file.name
Copy file from remote computer to local computer over ssh (the converse works as well)
scp username@ip.address:/directory/to/file.name local/directory/for/file.name
Count number of files in a directory recursively
find DIR_NAME -type f | wc -l