< All Advanced Penetration Testing Notes

lokust1234 | Advanced Penetration Testing | Module 1 - Linux

By: lokust1234 | Related Course: Advanced Penetration Testing | Published: August 22, 2017 | Modified: September 3, 2017
Join Cybrary

Notepadcommands 2 , nano

create a file and move a file

create a txt file use the ”touch” command

touch myfile ( will create a file called myfile)

mkdir mydirectory (will create a directory called mydirectory)

cp = copy command 

cp /home/georgia/myfile /home/georgia/mydirectory/myfile (copy the file from one file to another)

mv = move (renames it also) for ex. mv myfile myfile2 that will just rename the file

rm = remove

rm myfile2  (-s remove all files under that directory)

echo hi georgia > myfile (all of the output of the file went out to myfile)

type ”cat” = this will type the file output on the screen.

echo hi georgia a second time >> myfile (this will add the second line to the txt)

vi gedit emax are txt editors for linux

nano myfile = goes to nano txt editor with file you create.

You can search, use ctrl+ whatever commands on the bottom.

you have to be in insert mode to edit the txt file. hit I. Hit esc to get out of insert mode. hit dd. it will delete the line. edit shell code with this txt editor. to save, you hit shift colon : wq then hit enter. 



NotepadFile Permissions,chmod 0 7

ls -l = permissions under the listing command

R = read

W= Write

X = execute

D= directory

3 sets of 3 permissions for each file and directory.










chmod = to set permissions on files

chmod 750 myfile ( this means no else should have permissions but you and the group)

7 = owener

5 = group


grouping txt on txt file use cat (name of file) | grep (letter of the first stuff)  <– this will just group the names of whatever is listed with whatever letter it starts with

you can also cut the first word for example:

cat myfile | grep B | cut -d ” ”-f  1 | -u

-d = dilimeter 

-f = field 1,2,3,4,5,….

-u = sort

check stackoverflow.com to see more things 





< All Advanced Penetration Testing Notes
Join Cybrary

Our Revolution

We believe Cyber Security training should accessible for everyone, everywhere. Everyone deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is the world's largest community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

We recommend always using caution when following any link

Are you sure you want to continue?