cd ..
Move up one directory.
touch file.txt
Create an empty file named file.txt if it doesn't already exist.
grep "ERROR" app.log
Find every line containing the word ERROR.
ls /var/log
List the Linux operating system log files.
uvicorn main:app --reload
Start a FastAPI application with automatic reload whenever code changes.
cd ~
Go to the current user's home directory.
touch one.txt two.txt three.txt
Create three empty files at the same time.
grep -i "warning" app.log
Search for warning without caring about uppercase or lowercase letters.
journalctl -b
Display logs from the current system boot.
gh repo clone octocat/demo
Clone a GitHub repository using the GitHub CLI.
pwd
Display the full absolute path of the current working directory.
cp report.txt backup.txt
Copy report.txt into a new file named backup.txt.
grep -r "TODO" .
Recursively search every file in the current directory tree for TODO.
tail -f /var/log/syslog
Continuously watch new system log messages as they are written.
gh pr list
List the open Pull Requests in the current GitHub repository.
cat ../notes/todo.txt
Display the contents of a file located one directory above in the notes folder.
cp -r project backup/
Copy an entire directory and all of its contents recursively.
grep -n "Exception" server.log
Search for Exception and display the matching line numbers.
docker logs my-container > docker.log
Save the Docker container's logs into a file named docker.log.
gh workflow list
Display the GitHub Actions workflows configured for the repository.
cat /var/log/syslog
Display the contents of the system log using an absolute path starting from the root directory.
mv report.txt archive/
Move the file into the archive directory (or rename it if the destination is a filename).
grep -v "^#" config.conf
Show every line except those beginning with a # comment.
terraform apply -no-color > terraform.log 2>&1
Run Terraform and save both standard output and error messages into terraform.log.
gh run watch
Watch a GitHub Actions workflow run in real time until it completes.