forked from JaiMaaSheeravali/Roosh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0f6eba
commit 1ad80ac
Showing
20 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
cd | ||
to go to different directory | ||
ls | ||
to list directory contents | ||
man | ||
display manual pages | ||
mv | ||
Move or rename files and directories | ||
mkdir | ||
Creates a directory | ||
rmdir | ||
Removes a directory | ||
touch | ||
Change a file access and modification times |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cat {{file}} | ||
Print the contents of a file to the standard output | ||
cat {{file1}} {{file2}} > {{target_file}} | ||
Concatenate several files into the target file | ||
cat {{file1}} {{file2}} >> {{target_file}} | ||
Append several files into the target file | ||
cat -n {{file}} | ||
Number all output lines: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cd path/to/directory | ||
command to Go to the given directory | ||
cd | ||
command to go to home directory of current user | ||
cd .. | ||
Go up to the parent of the current directory | ||
cd - | ||
Go to the previously chosen directory |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
chmod u+x {{file}} | ||
Give the [u]ser who owns a file the right to e[x]ecute it | ||
chmod u+rw {{file_or_directory}} | ||
Give the [u]ser rights to [r]ead and [w]rite to a file/directory | ||
chmod g-x {{file}} | ||
Remove e[x]ecutable rights from the [g]roup | ||
chmod a+rx {{file}} | ||
Give [a]ll users rights to [r]ead and e[x]ecute | ||
chmod o=g {{file}} | ||
give [o]thers (not in the file owner's group) the same rights as the [g]roup | ||
chmod o= {{file}} | ||
Remove all rights from [o]thers | ||
chmod -R g+w,o+w {{directory}} | ||
Change permissions recursively giving [g]roup and [o]thers the ability to [w]rite | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
echo "{{Hello World}}" | ||
Print a text message. Note: quotes are optional | ||
echo "{{My path is $PATH}}" | ||
Print a message with environment variables | ||
echo -n "{{Hello World}}" | ||
Print a message without the trailing newline | ||
echo "{{Hello World}}" >> {{file.txt}} | ||
Append a message to the file | ||
echo -e "{{Column 1\tColumn 2}}" | ||
Enable interpretation of backslash escapes (special characters): | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
git config –global user.name “[name]” | ||
sets the author name to be used with your commits | ||
git config –global user.email “[email address]” | ||
sets the email address to be used with your commits | ||
git init [repository name] | ||
to start a new repository | ||
git clone [url] | ||
to obtain a repository from an existing URL | ||
git add [file] | ||
adds a file to the staging area | ||
git add * | ||
adds one or more to the staging area. | ||
git commit -m “[ Type in the commit message]” | ||
records or snapshots the file permanently in the version history | ||
git commit -a | ||
commits any files you’ve added with the git add command and also commits any files you’ve changed since then | ||
git diff –staged | ||
shows the differences between the files in the staging area and the latest version present | ||
git reset [file] | ||
command unstages the file, but it preserves the file contents | ||
git reset [commit] | ||
command undoes all the commits after the specified commit and preserves the changes locally | ||
git status | ||
command lists all the files that have to be committed. | ||
git log | ||
command is used to list the version history for the current branch. | ||
git branch | ||
lists all the local branches in the current repository | ||
git checkout [branch name] | ||
command is used to switch from one branch to another | ||
git merge [branch name] | ||
merges the specified branch’s history into the current branch. | ||
git remote add [variable name] [Remote Server Link] | ||
command is used to connect your local repository to the remote server | ||
git push [variable name] master | ||
sends the committed changes of master branch to your remote repository | ||
git push [variable name] [branch] | ||
command sends the branch commits to your remote repository | ||
git push –all [variable name] | ||
command pushes all branches to your remote repository | ||
git pull [Repository Link] | ||
command fetches and merges changes on the remote server to your working directory | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
grep "{{search_pattern}}" {{path/to/file}} | ||
Search for a pattern within a file | ||
grep --fixed-strings "{{exact_string}}" {{path/to/file}} | ||
Search for an exact string (disables regular expressions) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Cat | ||
Print and concatenate files | ||
echo | ||
Print given arguments | ||
chmod | ||
Change the access permissions of a file or directory | ||
grep | ||
Find patterns in files using regular expressions | ||
sort | ||
Sort lines of text files | ||
hostnamectl | ||
to find hostname | ||
git | ||
used while working with git |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Cat | ||
Print and concatenate files | ||
echo | ||
Print given arguments | ||
chmod | ||
Change the access permissions of a file or directory | ||
grep | ||
Find patterns in files using regular expressions | ||
sort | ||
Sort lines of text files | ||
hostnamectl | ||
to find hostname | ||
git | ||
used while working with git |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ls | ||
ls command is used to list directory contents | ||
ls -1 | ||
List files one per line | ||
ls -a | ||
List all files, including hidden files | ||
ls -F | ||
List all files, with trailing / added to directory names | ||
ls -la | ||
Long format list (permissions, ownership, size, and modification date) of all files |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
man {command} | ||
Display the man page for a command |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mkdir {{directory}} | ||
Create a directory in current directory or given path |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
mv {{source}} {{target}} | ||
Move files in arbitrary locations | ||
mv -f {{source}} {{target}} | ||
Do not prompt for confirmation before overwriting existing files | ||
mv -i {{source}} {{target}} | ||
Prompt for confirmation before overwriting existing files, regardless of file permissions |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
command_1 | command_2 | command_3 | .... | command_N | ||
to pass output of one command acts as input to another command |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rmdir {{path/to/directory}} | ||
to remove directory *use rm-r to remove empty directory* | ||
rmdir -p {{path/to/directory}} | ||
Remove the target and its parent directories (useful for nested dirs) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
sort {{path/to/file}} | ||
Sort a file in ascending order | ||
sort --reverse {{path/to/file}} | ||
Sort a file in descending order | ||
sort --ignore-case {{path/to/file}} | ||
Sort a file in case-insensitive way | ||
sort --numeric-sort {{path/to/file}} | ||
Sort a file using numeric rather than alphabetic order | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
touch {{filename}} | ||
Create a new empty file(s) or change the times for existing file(s) to current time | ||
touch -t {{YYYYMMDDHHMM.SS}} {{filename}} | ||
Set the times on a file to a specific date and time | ||
touch -r {{filename}} {{filename2}} | ||
Use the times from a file to set the times on a second file | ||
|