Overview for linux

How to count number of folders in folder|directory in Linux?

To count number of folders/directories/files in folder/directory is possible using wc command with a parameter -l. But we have to be sure, that we are counting only folders, so let's filter only folder using ls command, and then count then.

My example:

$ pwd
/home/dima/

Then let's take a look, which files and folders we have:

Read more

Written by Administrator on Saturday April 11, 2020

How to count characters in file in openSUSE Linux using terminal

Linux command line is very powerful tool even for string and character operations without installing any third-party applications.

To count number of characters in some file, containing text, you can use wc command with -m parameter using following scheme:

$ wc -m <file_name>

Examples:

$ wc -m nata-ubuntu-settings 
21 nata-ubuntu-settings

$ wc -m it-slang-v-rustine 
1019 it-slang-v-rustine

$ wc -m rongta-files-installation 
389 rongta-files-installation

Read more

Written by Administrator on Saturday April 11, 2020

How to remove symbolic link in Mabox Linux (Manjaro)

Before we remove a symbolic link (also called symlink) in Mabox Linux, we have to ensure, that link really exists. In Linux you (normally) don't see file extension, so, first, check, what contains symlink:

I have (I hope, we will check it) I have a symlink "/usr/bin/node", because I write

$ node --version

and receive this output:

Read more

Written by Administrator on Thursday April 9, 2020

How to create symbolic link in Mabox Linux (Manjaro) [with screenshots]

Sometimes happens, that you've installed software into .. some 'strange' directory, for example into you /home folder or /home/$USER/Download folder. And it means that you have to go into that folder and run a command. It's not comfortable. Linux has solution! You can use command-line utility ls to create a link between two files.

Rule is very simple:

$ ls -s <path_to_source_file> <path_to_link>

Let's look on real example in my system:

Read more

Written by Administrator on Thursday April 9, 2020

How to create a link to a program to launch it in terminal in Solus OS Linux

Just imagine you have installed a program and want to launch it in terminal with just the name of the program.

For example, I have downloaded a PaleMoon browser and not it's stored in:

$ /home/edustorage/Downloads/palemoon/palemoon

To launch this program, I have to go to :

$ cd /home/edustorage/Downloads/palemoon

and run a command:

$ sudo ./palemoon

Read more

Written by Administrator on Tuesday April 7, 2020