{ | |
"Git": { | |
"question": "How do I create a new branch and switch to it in Git?", | |
"answer": "How do I create a new branch and switch to it in Git?" | |
}, | |
"Bash": { | |
"question": "How to list all files including hidden ones?", | |
"answer": "How to list all files including hidden ones?\n\n1. Open the command prompt.\n\n2. Type the following command: `dir /s /b`\n\n3. Press Enter.\n\n4. The command will list all files and directories in the current directory, including hidden ones.\n\n5. To list only visible files, add the `-a` option to the command: `dir /s /b -a`\n\n6. To list only hidden files, add the `-h` option to the command: `dir /s /b -h`\n\n7. To list only files with a specific extension, add the `-e" | |
}, | |
"Grep": { | |
"question": "How do I search for a pattern in multiple files using grep?", | |
"answer": "How do I search for a pattern in multiple files using grep? I have a directory with several files, and I want to search for a specific pattern in all of them. I've tried using grep -r, but it only searches for the pattern in the current directory. How can I search for the pattern in all files in the directory?" | |
}, | |
"Tar/Gzip": { | |
"question": "How to extract a .tar.gz file?", | |
"answer": "How to extract a .tar.gz file?\n\n1. Open the terminal or command prompt.\n\n2. Navigate to the directory where the .tar.gz file is located.\n\n3. Type the following command:\n\n ```\n tar -xzf filename.tar.gz\n ```\n\n Replace `filename.tar.gz` with the name of the .tar.gz file.\n\n4. The .tar.gz file will be extracted to the current directory.\n\n5. You can now open the extracted directory in a text editor or use a command-line tool like `tar` to view the" | |
}, | |
"Python venv": { | |
"question": "How do I activate a virtual environment on Windows?", | |
"answer": "How do I activate a virtual environment on Windows?" | |
} | |
} |