1634190960
On Linux, there are commands to view processes running on your system. A process is spawned when you launch an application, but there are also many other processes running in the background of your computer, including programs to keep your system time accurate, to monitor for new filesystems, to index files, and more. They look at all processes on your computer so you can filter the list based on what you need to know.
1600135200
OpenJDk or Open Java Development Kit is a free, open-source framework of the Java Platform, Standard Edition (or Java SE). It contains the virtual machine, the Java Class Library, and the Java compiler. The difference between the Oracle OpenJDK and Oracle JDK is that OpenJDK is a source code reference point for the open-source model. Simultaneously, the Oracle JDK is a continuation or advanced model of the OpenJDK, which is not open source and requires a license to use.
In this article, we will be installing OpenJDK on Centos 8.
#tutorials #alternatives #centos #centos 8 #configuration #dnf #frameworks #java #java development kit #java ee #java environment variables #java framework #java jdk #java jre #java platform #java sdk #java se #jdk #jre #open java development kit #open source #openjdk #openjdk 11 #openjdk 8 #openjdk runtime environment
1684207573
Different types of files are used in Bash for different purposes. Many options are available in Bash to check if the particular file exists or not. The existence of the file can be checked using the file test operators with the “test” command or without the “test” command. The purposes of different types of file test operators to check the existence of the file are shown in this tutorial.
Many file test operators exist in Bash to check if a particular file exists or not. Some of them are mentioned in the following:
Operator | Purpose |
-f | It is used to check if the file exists and if it is a regular file. |
-d | It is used to check if the file exists as a directory. |
-e | It is used to check the existence of the file only. |
-h or -L | It is used to check if the file exists as a symbolic link. |
-r | It is used to check if the file exists as a readable file. |
-w | It is used to check if the file exists as a writable file. |
-x | It is used to check if the file exists as an executable file. |
-s | It is used to check if the file exists and if the file is nonzero. |
-b | It is used to check if the file exists as a block special file. |
-c | It is used to check if the file exists as a special character file. |
Many ways of checking the existence of the regular file are shown in this part of the tutorial.
Create a Bash file with the following script that takes the filename from the user and check whether the file exists in the current location or not using the -f operator in the “if” condition with the single third brackets ([]).
#!/bin/bash
#Take the filename
echo -n "Enter the filename: "
read filename
#Check whether the file exists or not using the -f operator
if [ -f "$filename" ]; then
echo "File exists."
else
echo "File does not exist."
fi
The script is executed twice in the following script. The non-existence filename is given in the first execution. The existing filename is given in the second execution. The “ls” command is executed to check whether the file exists or not.
Create a Bash file with the following script that takes the filename as a command-line argument and check whether the file exists in the current location or not using the -f operator in the “if” condition with the double third brackets ([[ ]]).
#!/bin/bash
#Take the filename from the command-line argument
filename=$1
#Check whether the argument is missing or not
if [ "$filename" != "" ]; then
#Check whether the file exists or not using the -f operator
if [[ -f "$filename" ]]; then
echo "File exists."
else
echo "File does not exist."
fi
else
echo "Argument is missing."
fi
The script is executed twice in the following script. No argument is given in the first execution. An existing filename is given as an argument in the second execution. The “ls” command is executed to check whether the file exists or not.
Create a Bash file with the following script that takes the filename as a command-line argument and check whether the file exists in the current location or not using the -f operator with the “test” command in the “if” condition.
#!/bin/bash
#Take the filename from the command-line argument
filename=$1
#Check whether the argument is missing or not
if [ $# -lt 1 ]; then
echo "No argument is given."
exit 1
fi
#Check whether the file exists or not using the -f operator
if test -f "$filename"; then
echo "File exists."
else
echo "File does not exist."
fi
The script is executed twice in the following script. No argument is given in the first execution. An existing filename is given in the second execution.
Create a Bash file with the following script that checks whether the file path exists or not using the -f operator with the “test” command in the “if” condition.
#!/bin/bash
#Set the filename with the directory location
filename='temp/courses.txt'
#Check whether the file exists or not using the -f operator
if test -f "$filename"; then
echo "File exists."
else
echo "File does not exist."
fi
The following output appears after executing the script:
The methods of checking whether a regular file exists or not in the current location or the particular location are shown in this tutorial using multiple examples.
Original article source at: https://linuxhint.com/
1614145832
It’s 2021, everything is getting replaced by a technologically emerged ecosystem, and mobile apps are one of the best examples to convey this message.
Though bypassing times, the development structure of mobile app has also been changed, but if you still follow the same process to create a mobile app for your business, then you are losing a ton of opportunities by not giving top-notch mobile experience to your users, which your competitors are doing.
You are about to lose potential existing customers you have, so what’s the ideal solution to build a successful mobile app in 2021?
This article will discuss how to build a mobile app in 2021 to help out many small businesses, startups & entrepreneurs by simplifying the mobile app development process for their business.
The first thing is to EVALUATE your mobile app IDEA means how your mobile app will change your target audience’s life and why your mobile app only can be the solution to their problem.
Now you have proposed a solution to a specific audience group, now start to think about the mobile app functionalities, the features would be in it, and simple to understand user interface with impressive UI designs.
From designing to development, everything is covered at this point; now, focus on a prelaunch marketing plan to create hype for your mobile app’s targeted audience, which will help you score initial downloads.
Boom, you are about to cross a particular download to generate a specific revenue through your mobile app.
#create an app in 2021 #process to create an app in 2021 #a complete process to create an app in 2021 #complete process to create an app in 2021 #process to create an app #complete process to create an app
1684215440
Различные типы файлов используются в Bash для разных целей. В Bash доступно множество опций, позволяющих проверить, существует ли конкретный файл или нет. Существование файла можно проверить с помощью операторов проверки файлов с командой «test» или без команды «test». В этом руководстве показаны цели различных типов операторов проверки файлов для проверки существования файла.
В Bash существует множество операторов проверки файлов, чтобы проверить, существует ли конкретный файл или нет. Некоторые из них упоминаются в следующем:
Оператор | Цель |
-f | Он используется для проверки того, существует ли файл и является ли он обычным файлом. |
-д | Он используется для проверки существования файла в виде каталога. |
-е | Он используется только для проверки существования файла. |
-ч или -л | Он используется для проверки существования файла в виде символической ссылки. |
-р | Он используется для проверки того, существует ли файл как читаемый файл. |
-w | Он используется для проверки того, существует ли файл как файл, доступный для записи. |
-Икс | Он используется для проверки того, существует ли файл как исполняемый файл. |
-с | Он используется для проверки того, существует ли файл и не равен ли он нулю. |
-б | Он используется для проверки того, существует ли файл в виде специального блочного файла. |
-с | Он используется для проверки того, существует ли файл как файл со специальными символами. |
В этой части руководства показано множество способов проверки существования обычного файла.
Создайте файл Bash со следующим сценарием, который берет имя файла от пользователя и проверяет, существует ли файл в текущем местоположении или нет, используя оператор -f в условии «если» с одной третьей скобкой ([]).
#!/bin/bash
#Take the filename
echo -n "Enter the filename: "
read filename
#Check whether the file exists or not using the -f operator
if [ -f "$filename" ]; then
echo "File exists."
else
echo "File does not exist."
fi
Сценарий выполняется дважды в следующем сценарии. Несуществующее имя файла дается при первом выполнении. Существующее имя файла дается во втором исполнении. Команда «ls» выполняется, чтобы проверить, существует ли файл или нет.
Создайте файл Bash со следующим сценарием, который принимает имя файла в качестве аргумента командной строки и проверяет, существует ли файл в текущем местоположении или нет, используя оператор -f в условии «если» с двойными третьими скобками ([[] ]).
#!/bin/bash
#Take the filename from the command-line argument
filename=$1
#Check whether the argument is missing or not
if [ "$filename" != "" ]; then
#Check whether the file exists or not using the -f operator
if [[ -f "$filename" ]]; then
echo "File exists."
else
echo "File does not exist."
fi
else
echo "Argument is missing."
fi
Сценарий выполняется дважды в следующем сценарии. При первом выполнении аргумент не передается. Существующее имя файла задается в качестве аргумента при втором выполнении. Команда «ls» выполняется, чтобы проверить, существует ли файл или нет.
Создайте файл Bash со следующим сценарием, который принимает имя файла в качестве аргумента командной строки и проверяет, существует ли файл в текущем местоположении или нет, используя оператор -f с командой «test» в условии «if».
#!/bin/bash
#Take the filename from the command-line argument
filename=$1
#Check whether the argument is missing or not
if [ $# -lt 1 ]; then
echo "No argument is given."
exit 1
fi
#Check whether the file exists or not using the -f operator
if test -f "$filename"; then
echo "File exists."
else
echo "File does not exist."
fi
Сценарий выполняется дважды в следующем сценарии. При первом выполнении аргумент не передается. Существующее имя файла дается во втором исполнении.
Создайте файл Bash со следующим скриптом, который проверяет, существует ли путь к файлу или нет, используя оператор -f с командой «test» в условии «if».
#!/bin/bash
#Set the filename with the directory location
filename='temp/courses.txt'
#Check whether the file exists or not using the -f operator
if test -f "$filename"; then
echo "File exists."
else
echo "File does not exist."
fi
После выполнения скрипта появляется следующий вывод:
Методы проверки того, существует ли обычный файл в текущем местоположении или в конкретном месте, показаны в этом руководстве с использованием нескольких примеров.
Оригинальный источник статьи: https://linuxhint.com/
1684211760
Bash 中出于不同的目的使用不同类型的文件。Bash 中有许多选项可用于检查特定文件是否存在。可以使用带有“test”命令或不带有“test”命令的文件测试操作符来检查文件是否存在。本教程显示了不同类型的文件测试操作符检查文件是否存在的目的。
Bash 中存在许多文件测试运算符来检查特定文件是否存在。下面提到了其中一些:
操作员 | 目的 |
-F | 它用于检查文件是否存在以及它是否是常规文件。 |
-d | 它用于检查文件是否作为目录存在。 |
-e | 它仅用于检查文件是否存在。 |
-h 或 -L | 它用于检查文件是否作为符号链接存在。 |
-r | 它用于检查文件是否作为可读文件存在。 |
-w | 它用于检查文件是否作为可写文件存在。 |
-X | 它用于检查文件是否作为可执行文件存在。 |
-s | 它用于检查文件是否存在以及文件是否为非零。 |
-b | 它用于检查文件是否作为块特殊文件存在。 |
-C | 它用于检查文件是否作为特殊字符文件存在。 |
本教程的这一部分显示了许多检查常规文件是否存在的方法。
使用以下脚本创建一个 Bash 文件,该脚本从用户那里获取文件名,并在“if”条件中使用带有第三个括号 ([]) 的 -f 运算符检查文件是否存在于当前位置。
#!/bin/bash
#Take the filename
echo -n "Enter the filename: "
read filename
#Check whether the file exists or not using the -f operator
if [ -f "$filename" ]; then
echo "File exists."
else
echo "File does not exist."
fi
该脚本在以下脚本中执行了两次。不存在的文件名在第一次执行时给出。现有文件名在第二次执行时给出。执行“ls”命令来检查文件是否存在。
使用以下脚本创建一个 Bash 文件,该脚本将文件名作为命令行参数,并在“if”条件中使用 -f 运算符和双第三括号 ([[ ] ]).
#!/bin/bash
#Take the filename from the command-line argument
filename=$1
#Check whether the argument is missing or not
if [ "$filename" != "" ]; then
#Check whether the file exists or not using the -f operator
if [[ -f "$filename" ]]; then
echo "File exists."
else
echo "File does not exist."
fi
else
echo "Argument is missing."
fi
该脚本在以下脚本中执行了两次。第一次执行时不给出参数。在第二次执行中,将现有文件名作为参数给出。执行“ls”命令来检查文件是否存在。
使用以下将文件名作为命令行参数的脚本创建 Bash 文件,并在“if”条件下使用 -f 运算符和“test”命令检查文件是否存在于当前位置。
#!/bin/bash
#Take the filename from the command-line argument
filename=$1
#Check whether the argument is missing or not
if [ $# -lt 1 ]; then
echo "No argument is given."
exit 1
fi
#Check whether the file exists or not using the -f operator
if test -f "$filename"; then
echo "File exists."
else
echo "File does not exist."
fi
该脚本在以下脚本中执行了两次。第一次执行时不给出参数。第二次执行时给出一个现有的文件名。
使用以下脚本创建 Bash 文件,在“if”条件下使用 -f 运算符和“test”命令检查文件路径是否存在。
#!/bin/bash
#Set the filename with the directory location
filename='temp/courses.txt'
#Check whether the file exists or not using the -f operator
if test -f "$filename"; then
echo "File exists."
else
echo "File does not exist."
fi
执行脚本后出现如下输出:
本教程通过多个示例展示了检查当前位置或特定位置是否存在常规文件的方法。
文章原文出处:https: //linuxhint.com/