Hi there again,

I'm still a newby in Python, so I'm taking the Google Python Class.

They talk about ls -l and rm -rf (with the last command the class started laughing)
But I don't understand it.

I googled it and a hint came to me, that is is a regular expression.
But I can't seem to find the true meaning of these RE's.

Can someone please explain what they do and maybe give me a website where I can find more of these expressions?

Thanks again!

ls and rm are a couple of command-line/system programs in Unix and Linux operating systems, they aren't regular expressions.
ls is used to list the files/directories in the current directory and rm is used to remove/delete files.
As stated, ls -l lists the files/folders in the current directory. The l parameter makes ls list more detailed information about the items in the current directory.
Similarly rm -rf will delete files/directories. The r parameter makes it delete files recursively (so it will go into any subdirectories and delete files there too), the f parameter suppresses any confirmation messages (e.g. "Are you sure you want to delete this file? (y/n)") and forcibly deletes any files.
So using rm -rf will delete everything in the current directory and everything in any sub-directories.

Opening a terminal session as root and using the rm -rf command at the root of the filesystem is one sure-fire way of deleting everything on your Unix/Linux system. Which may be why some of your class laughed when they saw it. It's OK to use rm -rf if you want to remove a lot of files/folders, but you need to be very careful when doing so! (Again, just don't use it at the root of the filesystem or in any system directories when you have root priveleges!)
Even as an ordinary user, using rm -rf in the wrong place could delete all files that you have the appropriate permissions for (so all of your personal files, settings etc.).

Edited 4 Years Ago by JasonHippy: tweaked

Thanks JasonHippy!
The example was using Linix, as I understand now.
I'm using Windows as OS, so I can ignore ls -land rm -rf commands for now.

Thanks again for the quick and extensive respons!

This question has already been answered. Start a new discussion instead.