'Difference between ./ and / in Linux? [closed]

I have been using Linux awhile and one thing I have never have understood, particularly when using the find command, is the difference between ./ and /. Usually I only use this format when using the find command. For some reason this makes a big difference, especially when searching by file name on lets say the entire root.

Example:

sudo find ./ -size +10M
sudo find / -size +10M

sudo find ./ -iname "zebra.txt"
sudo find / -iname "zebra.txt"


Solution 1:[1]

./ means the current directory, wherever you've cd-ed to. For example if I run the find command in Desktop with ./, it means to find files and folders in Desktop.

Sometimes ./ is used to run executables. Like this:

./run.sh

But / means root partition. For example some peoples kidding new person with very dangerous command. Do not run this command because your root partition will be destroyed and all of the OS files and folders will be removed.

sudo rm -rf /

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John Kugelman