How To Remove A Directory In Command Line From Ubuntu 22.04

How to Remove a Directory in Linux?

There are two Linux commands you can use to remove a directory from the terminal window or command line:

  • The rm command removes complete directories, including subdirectories and files.
  • The rmdir command removes empty directories.

It is important to note that the rm and rmdir commands permanently remove directories without moving them to the Trash directory. This means that you cannot restore a directory removed using these commands.

If you want to remove an empty directory, add the -d flag to the rm command:

rm -d Example

If you want to remove a directory whose name starts with a hyphen (), use the rm -- [directory name] or rm ./[directory name] syntax.

Use the -r flag to delete a directory that contains subdirectories and files.

rmdir Command

The Linux rmdir command removes empty directories only. The command uses the following syntax:

rmdir [options] [directory name]

The rmdir command includes the following options:

  • --ignore-fail-on-non-empty: Doesn’t show an error message when trying to remove a non-empty directory.
  • -p: Removes the directory along with its parent in the hierarchy.
  • -v: Provides a verbose output.
  • --help: Displays help text.
  • --version: Displays the command version.

Install .Deb Files From Command Line On Ubuntu 22.04

If you want to install deb packages in the command line, you can use either the apt command or the dpkg command. The apt command actually uses the dpkg command underneath it, but apt is more popular and easier to use.

If you want to use the apt command for deb files, use it like this:

$ sudo apt install path_to_deb_file

If you want to use the dpkg command for installing deb packages, here’s how to do it:

$ sudo dpkg -i path_to_deb_file

In both commands, you should replace path_to_deb_file with the path and name of the deb file you’ve downloaded.


Uninstalling & Reinstalling Apache2 On Ubuntu 22.04

To uninstall Apache2 on Ubuntu 22.04

$ sudo apt-get purge apache2

Reinstall Apache2 on Ubuntu 22.04

$ sudo apt-get install apache2

Make sure that Apache2 has been correctly installed and is working

$ systemctl status apache2.service

Clear The Node Repl or Console

Node JS is a JavaScript server-side runtime. It can read and write to disk, process text streams and more. Node also includes its own package manager, npm (Node Package Manager), which makes it easy for developers to install third party modules that extend the functionality of their application or provide additional features without managing dependencies manually.

“how to clear screen in node js command prompt” is a question that has been asked many times before. The answer is as follows: “To clear the console, use Ctrl+L.”


Curation Demands Citation Too

I absolutely believe that success on these platforms as a curator demands damn near 176% ownership of posts. That means making posts look like they came from YOU.

This can look like:

1) RTs without actually adding “RT” or clicking RT button

2) adding logo watermarks to images(even though YOU didn’t hire that photographer or take that picture

3) Not including links to actual source.

While all of these actions have something questionable, it is this last one, not citing sources, that disturbs me most.

Every barber shop and beauty salon from Maine to Mexican borders got a system of vetting information. It starts with:

Was YOU there???

Did YOU see it???

Who was there???

Who YOU hear it from???

Who or what institution YOU get information from MATTERS.

If they do not show YOU or link YOU to their source in some shape form or fashion, it should be immediately tagged as:

1) Bullshyt,
2) Propaganda, or
3)Fake News.

Thank YOU. This has been another OWL’s Asylum public service announcement. For more, hit that Follow button.