Sure! Here are some common Bash command examples:
-
List files in a directory:
ls -
Change directory:
cd /path/to/directory -
Create a new directory:
mkdir new_directory -
Copy a file:
cp source.txt destination.txt -
Move or rename a file:
mv old_name.txt new_name.txt -
Delete a file:
rm file_to_delete.txt -
Display the contents of a file:
cat file.txt -
Search for a string in a file:
grep "search_term" file.txt -
Count lines, words, and characters in a file:
wc file.txt -
Run a script:
./script.sh
These commands are fundamental for navigating and managing files in a Bash environment. If you need more specific examples or explanations, feel free to ask!
