Created
April 22, 2013 04:28
-
-
Save d1/5432446 to your computer and use it in GitHub Desktop.
Bash history from the command line talk at RubyMKE 4/16
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
ls | |
clear | |
\ls | |
type ls | |
alias ls='ls -1' | |
ls | |
type ls | |
which ls | |
type cd | |
type git | |
type sh | |
man man | |
man ls | |
type git | |
ls asjkdhf | |
touch tmp | |
cp tmp tmp2 | |
touch temp | |
ls | |
alias ls='ls -aF' | |
ls | |
ln -s tmp temp | |
ln -s tmp temp2 | |
ls | |
rm temp2 | |
ls | |
rm temp | |
ls | |
echo "file1" > file1.tmp | |
echo "file1" | |
echo `ls` | |
echo $(ls) | |
cat <(ls) | |
cp -r vendor/ vendor-new | |
diff vendor vendor-new/ | |
cd vendor-new/ | |
echo "file1" > file1 | |
cd .. | |
echo "file1" > file1 | |
diff vendor vendor-new/ | |
cat <(ls) | |
cat Gemfile | wc -l | |
type wc | |
man wc | |
cat Gemfile | wc -w | |
wc -w Gemfile | |
wc -w Gemfile Gemfile.lock | |
wc -w * | |
wc -w * > stdout.txt | |
cat stdout.txt | |
wc -w * > stdout.txt 2> stderr.txt | |
apropos link | |
wc -w * > stdout.txt 2> stderr.txt | |
cat stdout.txt | |
cat stderr.txt | |
ls | |
wc -w * 2>> stderr.txt | |
cat stderr.txt | |
man tee | |
cat Gemfile | tee Gemfile.new | wc -w | |
more Gemfile.new | |
man tee | |
wc -l * |tee errors.txt | |
more errors.txt | |
wc -l * |tee errors.txt | wc -l | |
wc errors.txt | |
wc -l * |tee errors.txt 2>&1 | wc -l | |
wc -l * 2>&1 |tee errors.txt | wc -l | |
more errors.txt | |
find . | |
wc -l * 3>&1 1>&2 2>&3 |tee output.txt | |
more output.txt | |
ls -l | |
find . | |
ls | |
find app lib | |
ls | |
find app lib -name "*.rb" | |
ls | |
ls -l Gemfile* | |
ls *.rb | |
ls -R *.rb | |
ls -r *.rb | |
find app lib -name *.rb | |
type find | |
readlink -f /usr/bin/find | |
readlink /usr/bin/find | |
man readlink | |
readlink -F /usr/bin/find | |
readlink /usr/bin/find | |
ls -l /usr/bin/find | |
find . *.rb | |
find . | |
find . -name *.rb | |
find . -name "*.rb" | |
find app lib -name "*.rb" | |
touch app/controllers/something.rbs | |
find app lib -name "*.rb"|xargs | |
find app lib -name "*.rb"|xargs wc -l | |
find app lib -name "*.rb"|xargs -J % wc -l % | |
find app lib -name "*.rb"|xargs wc -l | |
grep -r class --include="*.rb" | |
grep -r --include="*.rb" | |
grep -r class --include="*.rb" . | |
grep -r "^[[:space:]]*class\b" --include="*.rb" . | |
grep -r "^[[:space:]]*class\b" --include="*.rb" app lib | |
grep -rh "^[[:space:]]*class\b" --include="*.rb" app lib | |
grep -rl "^[[:space:]]*class\b" --include="*.rb" app lib | |
find app lib -name "*.rb"|xargs grep -r "^[[:space:]]*class\b" | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\b" | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2 | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do grep -r "\b$class\b" app lib --include="*.rb"; find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do grep -r "\b$class\b" app lib --include="*.rb"; done | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo "$class"; done | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo "$class"; done | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do grep -r "\b$class\b" app lib --include="*.rb"; done | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do grep -lr "\b$class\b" app lib --include="*.rb"; done | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb"` $class; done | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done| sort -n | |
cd ../discourse/ | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done| sort -n | |
find app lib -name "*.rb"|xargs grep -h "^[[:space:]]*class\|module\b" |cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class; done| sort -n | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | sed 's/^[[:space:]]*//' | cut -d ' ' -f 2| while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done| sort -n | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | sed 's/^[[:space:]]*//' | cut -d ' ' -f 2 | |
find app lib -name "*.rb"|xargs grep -rh "^[[:space:]]*class\|module\b" | sed 's/^[[:space:]]*//' | cut -d ' ' -f 2| sort | uniq |while read class; do echo `grep -lr "\b$class\b" app lib --include="*.rb" | wc -l` $class ; done| sort -n | |
echo "hello world" | cut -f 1 | |
echo "hello world" | cut -d " " -f 1 | |
echo "hello world:hi" | cut -d " :" -f 1 | |
echo "hello world:hi" | cut -d ":" -f 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment