DreadyCrig
1/28/2015 - 3:18 PM

Random Command Line Things

Random Command Line Things

# Read the last line of a error log or any file that is web accessble. replace $url with the url to fetch
curl "$url" 2>/dev/null | tail -n 1


# Save your id_rsa.pub key
cat ~/.ssh/id_rsa.pub | pbcopy

# Get count of files in a directory
cd the_directory_you_want_counted
ls | wc -l