Skip to content

Instantly share code, notes, and snippets.

@abid019
Created November 21, 2024 06:02
Show Gist options
  • Save abid019/12f7a1e03dfb8849dbe2086484f70201 to your computer and use it in GitHub Desktop.
Save abid019/12f7a1e03dfb8849dbe2086484f70201 to your computer and use it in GitHub Desktop.
mkdir hello #creating directory hello
cd hello #move to directory hello
mkdir five one #creating directory five and one in hello
cd five #move to directory five
mkdir six #creating directory six
cd six #move to directory six
touch c.txt #creating c.txt file using touch command in six
mkdir seven #creating directory seven
cd seven #move to directory seven
touch error.log #creating error.log file using touch command in seven
cd ~ #moved to root
cd desktop #moved to desktop
cd ~ #moved to root again
cd ~/desktop/hello/one #moved to directory one from root
touch a.txt b.txt #creating a.txt and b.txt file simultaneously
mkdir two #creating directory two
cd two #move to directory two
touch d.txt #creating d.txt file using touch commands
mkdir three #creating directory three using mkdir
cd three #move to three folder
touch e.txt #creating e.txt file in three folder
mkdir four #creating directory four
touch access.log #creating access.log file in four directory
cd / #moved to root directory
cd ~/desktop/hello/one/two/three #moved to directory three
rm access.log #deleting the access.log file from three
ls -l #reading the all files and folder present in directory three
cd four #move to directory four
touch access.log #creating the access.log file again in four directory
rm access.log #now delete the access.log file from four
ls -l #checking the file present after deletion in four directory
cd .. #move one step back in directory now i am in directory three
cd ../../ #move two step back in directory. Reached at one
cd .. #move one step back in directory now i at in hello folder
cd five/six/seven #now moved to directory seven
rm error.log #remove error.log file which is present in seven
ls -l #see the files present in seven
cd ../../../ #move back three step reached at hello
cd one #now move to one directory
#write some text into a.txt file using echo commands
echo "Unix is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, development starting in the 1970s at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others" > a.txt
cat a.txt #checked whether it's written in a.txt or not
cd ../five #moved to directory five
cd .. #move one step back
rm -R five #remove whole five directory recursivly
ls -l #checked whether it's present or not
mv one uno #rename the one folder to uno
ls #check for rename
cd uno #moved to uno
mv a.txt two #moved the a.txt file from uno to two folder
cd two #moved two two
ls #checked for a.txt is present in two or not
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment