Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #58 #1

Closed
wants to merge 50 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b0dd45c
Minor changes (#12)
lex111 Apr 4, 2017
5127d4e
Update README.md (#10)
Apr 4, 2017
5009704
fix function spelling mistake issue #15 (#16)
AhmadShahid Apr 4, 2017
56e9c9c
corrected typos (#18)
Apr 4, 2017
c67218e
Removed -f option for rm command (#14)
itsashis4u Apr 4, 2017
42d6927
Add detail for `-f` option in `rm` command
Apr 4, 2017
aadad11
alphabetical order in command list
Apr 4, 2017
0c46fdf
corrected test for non-empty file (#19)
floj Apr 4, 2017
089476e
Corrected example for array initialization (#22)
diserere Apr 5, 2017
b7a87a8
add basic find support (#21)
ohmyhusky Apr 5, 2017
911be89
minor update
Apr 5, 2017
f5d4727
Changed `ls -al` to the more common `ls -la` (#23)
borekb Apr 5, 2017
b8311a4
Add du command options & better example (#25)
tobiasbueschel Apr 5, 2017
191c202
minor fix
Apr 5, 2017
a9ee7cb
Remove zsh from export example
Apr 5, 2017
1e2cd1f
Fix quickly go to directory example (#27)
l2dy Apr 6, 2017
6d3d99b
fix: minor spelling error (#28)
Sebring Apr 6, 2017
2cfa591
Add another use for `mv` command (#30)
diegosanz Apr 6, 2017
e073123
Add description for whatis command (#31)
Apr 7, 2017
3a7c7fc
Clarify description of OR operator (#35)
kaveet Apr 8, 2017
1ab02a3
Add copy example for cat (#38)
ganes1410 Apr 9, 2017
2317a5b
Reformatting (#39)
mumararshaikh Apr 11, 2017
b23931e
add missing TOC
Apr 11, 2017
54681a2
Update README.md
Apr 11, 2017
1131add
add exit trap trick (#45)
ryanucode Apr 16, 2017
d85384a
improved description from the touch command (#51)
gibatronic Apr 18, 2017
15a44de
Update README.md (#32)
mumararshaikh Apr 24, 2017
4329a73
add more detail link on chmod command
Apr 24, 2017
cae0769
chown added (#34)
Apr 24, 2017
634bda0
add process monitoring section , add nohup command and move kill and …
zelazna Apr 24, 2017
e17c584
Update README.md
Apr 24, 2017
b648976
Update README.md
Apr 24, 2017
32eabdc
~/bin directory to access scripts easily and keeping environment vari…
joaofreires Apr 24, 2017
d374a6d
added the "jobs" command, close #17 (#52)
May 2, 2017
986117e
Update README.md
May 2, 2017
809824a
Update README.md (#54)
omergulen May 3, 2017
9a0aefb
Update README.md (#53)
omergulen May 3, 2017
6d38f42
Turkish link added. (#56)
omergulen May 7, 2017
8d38caf
Update README.md
May 7, 2017
b90e8b5
Fix function declaration syntax (#59)
klikstermkd May 14, 2017
c0001e9
add japanese link (#61)
noid11 Jun 30, 2017
de77a6f
add chinese translation reference (#64)
vuuihc Oct 5, 2017
b2e947f
Add some more info on ps (#65)
umer936 Nov 19, 2017
9fa6963
Remove gendered language (#63)
EvanHahn Nov 19, 2017
017a050
Fixes #50 (#57)
tomhydra Nov 19, 2017
659b9b2
updated shebang to use env (#67)
gibatronic Jan 3, 2018
a24eaec
Fixes (#74)
Rowayda-Khayri May 5, 2019
1e32681
Create FUNDING.yml
May 23, 2019
90d268b
adding info for mkdir and command execution (#77)
cary-williams Oct 16, 2019
c19dd16
Replace > with codeblocks (#78)
zlatanvasovic Jan 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Replace > with codeblocks (Idnan#78)
The text is very unreadable in several sections thanks to the use of `>` (quote syntax in Markdown), so I replaced it with codeblocks.
zlatanvasovic authored and Idnan committed Jan 28, 2020
commit c19dd162de73952db040b8514089b4c506cda2b8
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1131,25 +1131,40 @@ done
# 3. Tricks

## Set an alias
Open `bash_profile` by running following command `nano ~/.bash_profile`
> alias dockerlogin='ssh [email protected] -p2222' # add your alias in .bash_profile

Run `nano ~/.bash_profile` and add the following line:

```bash
alias dockerlogin='ssh [email protected] -p2222' # add your alias in .bash_profile
```

## To quickly go to a specific directory
nano ~/.bashrc
> export hotellogs="/workspace/hotel-api/storage/logs"

Run `nano ~/.bashrc` and add the following line:

```bash
export hotellogs="/workspace/hotel-api/storage/logs"
```

Now you can use the saved path:

```bash
source ~/.bashrc
cd $hotellogs
```

## Re-execute the previous command

This goes back to the days before you could rely on keyboards to have an "up" arrow key, but can still be useful.
To run the last command in your history
> !!
```bash
!!
```
A common error is to forget to use `sudo` to prefix a command requiring privileged execution. Instead of typing the whole command again, you can:
> sudo !!
This would change a `mkdir somedir` into `sudo mkdir somedir`
```bash
sudo !!
```
This would change a `mkdir somedir` into `sudo mkdir somedir`.

## Exit traps

@@ -1176,10 +1191,10 @@ You can easily access your scripts by creating a bin folder in your home with `m

If you can not access, try append the code below in your `~/.bash_profile` file and after do `source ~/.bash_profile`.
```bash
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
```

# 4. Debugging