wget -i filename.csv
find ~/ -name "filename.txt"
du -h <folder_name>
wget --recursive --no-parent <url_folder_name>
chmod +x myscript.sh
wsl -d Ubuntu-22.04
- jpeg:jpegtran -optimize -progressive -outfile output.jpg input.jpg
- png: optipng -o7 input.png
for file in *.zip; do unzip -q "$file" -d "${file%.*}"; done
ls -d */ -1
tree > output.txt
Command | Description |
---|---|
pwd |
Print the current working directory. |
ls |
List files and directories. |
cd [directory] |
Change the current directory. |
cd .. |
Move to the parent directory. |
cd ~ |
Move to the home directory. |
mkdir [directory] |
Create a new directory. |
rm [file] |
Remove a file. |
rm -r [directory] |
Remove a directory and its contents recursively. |
cp [source] [destination] |
Copy files and directories. |
mv [source] [destination] |
Move or rename files and directories. |
cat [file] |
Display the contents of a file. |
head [file] |
Display the first few lines of a file. |
tail [file] |
Display the last few lines of a file. |
less [file] |
View a file with pagination. |
touch [file] |
Create an empty file or update the modification timestamp. |
chmod [permissions] [file] |
Change the permissions of a file or directory. |
chown [owner] [file] |
Change the owner of a file or directory. |
chgrp [group] [file] |
Change the group ownership of a file or directory. |
grep [pattern] [file] |
Search for a pattern in a file. |
grep -r [pattern] [directory] |
Search for a pattern in files recursively. |
find [directory] -name [filename] |
Search for files by name in a directory. |
sort [file] |
Sort lines in a file. |
wc [file] |
Count lines, words, and characters in a file. |
tail -f [file] |
Continuously display the last lines of a file (useful for log files). |
ps |
Display running processes. |
ps aux |
Display detailed information about running processes. |
top |
Monitor system processes in real-time. |
kill [PID] |
Terminate a process by its process ID. |
killall [process_name] |
Terminate all processes with a specific name. |
ping [host] |
Send ICMP echo requests to a host. |
nslookup [host] |
Perform DNS lookup for a domain name. |
wget [URL] |
Download files from the web. |
curl [URL] |
Transfer data to or from a server using various protocols. |
ifconfig |
Display network interface configuration (deprecated, use ip command instead). |
ip addr show |
Display IP addresses and network interfaces. |
netstat |
Display network connections, routing tables, and network interface statistics. |
sha256sum -c checksums.txt