- pwd: Print Working Directory - Displays the current directory path.Example: pwd
- ls: List - Lists files and directories in the current directory.Example: ls -l
- cd: Change Directory - Moves to the specified directory.Example: cd /path/to/directory
- mkdir: Make Directory - Creates a new directory.Example: mkdir new_directory
- touch: Create a new file or update the access and modification times of an existing file.Example: touch new_file.txt
- rm: Remove - Deletes files or directories.Example: rm file.txt
- grep: Global Regular Expression Print - Searches for patterns in files.Example: grep "pattern" file.txt
- chmod: Change Mode - Changes the permissions of files or directories.Example: chmod 755 file.txt
- chown: Change Owner - Changes the owner of files or directories.Example: chown user:group file.txt
- ps: Process Status - Displays information about running processes.Example: ps aux
- cat: Concatenate - Displays the contents of a file.Example: cat file.txt
- cp: Copy - Copies files or directories.Example: cp file.txt new_directory/
- mv: Move - Moves or renames files or directories.Example: mv file.txt new_location/file.txt
- find: Find - Searches for files and directories.Example: find /path/to/search -name "filename"
- awk: Pattern Scanning and Processing Language - Processes text files.Example: awk '{print $1}' file.txt
- sed: Stream Editor - Edits text files.Example: sed 's/old_text/new_text/g' file.txt
- tar: Tape Archive - Creates or extracts files from a tarball.Example: tar -czvf archive.tar.gz directory/
- git init: Initialize a new Git repository.Example: git init
- git clone: Clone a repository into a new directory.Example: git clone https://github.com/username/repository.git
- git add: Add file contents to the index.Example: git add file.txt
- git commit: Record changes to the repository.Example: git commit -m "Commit message"
- git status: Show the working tree status.Example: git status
- git branch: List, create, or delete branches.Example: git branch
- git checkout: Switch branches or restore working tree files.Example: git checkout branch_name
- git merge: Join two or more development histories together.Example: git merge branch_name
- git push: Update remote refs along with associated objects.Example: git push origin branch_name
- git pull: Fetch from and integrate with another repository or a local branch.Example: git pull origin branch_name
- git log: Show commit logs.Example: git log
- git diff: Show changes between commits, commit and working tree, etc.Example: git diff commit_hash
I have added a cheatsheet for your reference, Make sure every cheatsheet must be UNIQUE
DevOps Engineer at Capgemini
1 年Happy Learning :)