text
stringclasses
144 values
User: How do I create an empty file?
Assistant: Run `touch index.js`
```session
$ git commit -m "fix: resolve permission issue"
[main a1b2c3d] fix: resolve permission issue
2 files changed, 14 insertions(+), 3 deletions(-)
$ git push origin main
To github.com:user/repo.git
e4f5g6h..a1b2c3d main -> main
```
User: How do I list running processes matching python?
Assistant: Run `ps aux | grep python`
User: How do I view compact git log history?
Assistant: Run `git log --oneline -n 10`
```session
$ mkdir project && cd project
$ git init
Initialized empty Git repository in /home/user/project/.git/
$ touch main.py README.md
$ git status
On branch main
Untracked files:
README.md
main.py
```
```session
$ git commit -m "fix: resolve permission issue"
[main a1b2c3d] fix: resolve permission issue
2 files changed, 14 insertions(+), 3 deletions(-)
$ git push origin main
To github.com:user/repo.git
e4f5g6h..a1b2c3d main -> main
```
User: How do I force remove a folder and all contents?
Assistant: Run `rm -rf target_folder/`
```session
$ ps aux | grep python
user 12345 98.2 4.1 452104 338102 ? Rsl 00:00 12:30 python train.py
user 12390 0.0 0.0 6200 892 pts/0 S+ 00:15 0:00 grep python
```
User: How do I move or rename a file?
Assistant: Run `mv old_filename.txt new_filename.txt`
User: How do I check system RAM usage?
Assistant: Run `free -h`
```session
$ ps aux | grep python
user 12345 98.2 4.1 452104 338102 ? Rsl 00:00 12:30 python train.py
user 12390 0.0 0.0 6200 892 pts/0 S+ 00:15 0:00 grep python
```
User: How do I stage all changed files in git?
Assistant: Run `git add .`
```session
$ mkdir project && cd project
$ git init
Initialized empty Git repository in /home/user/project/.git/
$ touch main.py README.md
$ git status
On branch main
Untracked files:
README.md
main.py
```
User: How do I create a nested directory structure?
Assistant: Run `mkdir -p path/to/nested/directory`
```session
$ grep -rn "import torch" src/
src/model.py:1:import torch
src/train.py:2:import torch
src/utils.py:1:import torch
```
User: How do I count lines in a text file?
Assistant: Run `wc -l dataset.txt`
User: How do I update package lists on Ubuntu?
Assistant: Run `sudo apt update && sudo apt upgrade -y`
User: How do I inspect the first 20 lines of a file?
Assistant: Run `head -n 20 logfile.log`
User: How do I find all python files in the current folder?
Assistant: Run `find . -type f -name "*.py"`
```session
$ curl -I https://api.github.com