Advertisement
kevin_tanjung

Guide for Command Line Usage

Apr 27th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. Open GitBash => Run as Administrator
  2.  
  3. // 1. Check your Environment
  4. $ cd ~/code/homestead
  5. $ vagrant status
  6.  
  7. // 1.1 Boot Vagrant
  8. $ vagrant up
  9.  
  10. // 1.2 Stop Vagrant
  11. $ vagrant halt —force
  12.  
  13. // 1.3 SSH into Vagrant
  14. $ vagrant ssh
  15.  
  16.  
  17.  
  18. List of common Bash Command
  19. ===========================
  20.  
  21. Ctrl + C => to cancel a command or exit from a running command
  22.  
  23. executable [arguments...] [--options...] [-O]
  24.  
  25. ls =>
  26. ls -a => list all files (including hidden directory)
  27. ls -l => list dental detail: file permission, last modifie
  28. ls -al
  29.  
  30. . => Path to current directory
  31. .. => Path to parent directory
  32.  
  33. pwd => show the path of current directory
  34. cd [path/to/directory] => change directory
  35. cd .. => move up a directory
  36. mkdir [folder name] => make directory
  37. touch [file name] => create a file
  38. ls [:path/to/folder] => list the inside of directory
  39. ls [:path/to/folder] -a => list all files (including hidden files and directory)
  40. ls [:path/to/folder] -l => list the inside of directory with detailed information
  41. mv [path/to/old] [path/to/new] => move / rename
  42. cp [path/to/old] [path/to/new] => copy
  43. rm [path/to/file] => remove
  44. rm -r [path/to/directory] => remove a directory
  45. clear => clear the console
  46. man [executable name] => open the manual
  47. ln -s [path/to/source] [path/to/link] => create a symbolic link (shortcut)
  48.  
  49.  
  50.  
  51. Laravel Command
  52. ===============
  53.  
  54. Composer is a Package Manager for PHP.
  55.  
  56. composer install => Use for beginning project / update package changes from other developer
  57. composer update => Update the current packages & install new one
  58. composer dump-autoload => Update the autoloading of classmate
  59.  
  60. laravel new [project name] => Create a Laravel Project
  61.  
  62. php artisan list => List available command in Laravel
  63. php artisan [command name] --help => Open the manual of the PHP artisan command
  64.  
  65. php artisan make:migration [migration name] => Create a new table migration
  66.  
  67.  
  68.  
  69. Git Command
  70. ===========
  71.  
  72. git init => Create a new Git repository
  73. git status => Check the status of current state
  74. git add -a [directory] => Move a file to staging area for committal
  75. git commit -m [message] => Commit the changes
  76. git reset [directory] => Move a file back from staging area
  77. git checkout -- [directory] => Cancel the changes
  78. git remote add [name] [url] => Add a Git remote repository (GitLab, GitHub)
  79. git push [name] [branch] => Push latest commits to remote repository
  80. git pull [name] [branch] => Pull latest commits to remote repository
  81. git commit --amend => Change the commit message of last commit
  82.  
  83.  
  84.  
  85. Unix Permission
  86. ============
  87. no permission => 0
  88. read => 1
  89. write => 2
  90. execute => 3
  91. read + write => 4
  92. read + execute => 5
  93. write + execute => 6
  94. read + write + execute => 7
  95.  
  96. Current User | Group | Everybody
  97. r-x |rwx | r—
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement