Created
March 6, 2018 02:27
-
-
Save davidcorbin/7d29570b1cb53bfaf2670d03adc3ae27 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
set -x | |
pwd | |
#cd ~ | |
mkdir temp | |
mkdir temp/stuff | |
mkdir temp/stuff/things | |
mkdir -p temp/stuff/things/orange/apple/pear/grape | |
# Create 20 directories | |
for i in `seq 1 11`; | |
do | |
mkdir temp/$i | |
done | |
for i in `seq 1 11`; | |
do | |
mkdir temp/stuff/$i | |
done | |
mkdir "I Have Fun" | |
# LS | |
cd temp | |
ls | |
cd stuff | |
ls | |
cd things | |
ls | |
cd orange | |
ls | |
cd apple | |
ls | |
cd pear | |
ls | |
cd grape | |
ls | |
cd .. | |
ls | |
cd ../../../ | |
ls | |
cd ../../ | |
ls | |
ls -lR | |
cd ../ | |
cd temp | |
ls | |
cd stuff/things/orange/apple/pear/grape/ | |
cd .. | |
rmdir grape | |
cd .. | |
rmdir pear | |
cd .. | |
ls | |
rmdir apple | |
cd .. | |
ls | |
rmdir orange | |
cd .. | |
ls | |
rmdir things | |
cd .. | |
ls | |
rmdir stuff | |
pwd | |
mkdir -p i/like/icecream | |
pushd i/like/icecream | |
popd | |
pwd | |
pushd i/like | |
pwd | |
pushd icecream | |
pwd | |
popd | |
pwd | |
popd | |
pushd i/like/icecream | |
pushd | |
pwd | |
pushd | |
pwd | |
cd ../../../ | |
pwd | |
touch iamcool.txt | |
ls | |
cp iamcool.txt neat.txt | |
ls | |
cp neat.txt awesome.txt | |
ls | |
cp awesome.txt thefourthfile.txt | |
ls | |
mkdir something | |
cp awesome.txt something/ | |
ls | |
ls something/ | |
cp -r something newplace | |
ls newplace/ | |
mv awesome.txt uncool.txt | |
ls | |
mv newplace oldplace | |
ls | |
mv oldplace newplace | |
ls | |
echo "this is test data" > test.txt | |
cat test.txt | |
echo "this is test data 2" > test2.txt | |
cat test2.txt | |
cat test2.txt | |
cat test.txt | |
ls | |
rm uncool.txt | |
ls | |
rm iamcool.txt neat.txt thefourthfile.txt | |
ls | |
cp -r something newplace | |
rm something/awesome.txt | |
rmdir something | |
rm -rf newplace | |
ls | |
exit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment