Found 41 Articles for Unix

Get unix timestamp from string without setting default timezone in PHP

AmitDiwan
Updated on 06-Apr-2020 08:23:28

477 Views

String has a time zone, and there is usually no need to set a default time zone. But when it needs to be printed, the default time zone can be set explicitly. Below is the code to do the same −Default timezoneExample Live Demoecho date_default_timezone_get();OutputThis will produce the following output −UTCWhen timezone is specifiedExample Live Demoecho date("Y-m-d H:i:s",strtotime("1/1/2020 00:00:00 America/Los_Angeles"));OutputThis will produce the following output −2020-01-01 08:00:00 Another way of specifying timezoneExample Live Demoecho date("Y-m-d H:i:s",strtotime("1/1/2020 00:00:00"));OutputThis will produce the following output −2020-01-01 00:00:00

How to Create a New Ext4 File System in Linux?

Pradeep Elance
Updated on 25-Feb-2020 06:14:54

4K+ Views

The hard disk in a computer is formatted with specific file system so that the operating system can read and write into it. For UNIX based systems we have various type of file systems. In this article we will see how to format a new partition in hard disk with ext4 file system.Available Filesystem typesFirst we see what are the different file systems available for the current operating system. The below command lists all those file systems.$ ls -1 /sbin/mkfs*Running the above code gives us the following result −/sbin/mkfs /sbin/mkfs.bfs /sbin/mkfs.cramfs /sbin/mkfs.ext2 /sbin/mkfs.ext3 /sbin/mkfs.ext4 /sbin/mkfs.ext4dev /sbin/mkfs.fat /sbin/mkfs.minix /sbin/mkfs.msdos /sbin/mkfs.ntfs /sbin/mkfs.vfatLook ... Read More

Frequently Used Examples of ‘Fuser’ Command in Linux

Samual Sam
Updated on 28-Jan-2020 12:24:30

230 Views

The fuser utility in Linux is a very smart Unix utility. As the name suggests, it offers knowledge about file user or the process that is currently utilizing the file or directory. This article explains about – Frequently used examples of ‘fuser’ Command in Linux.To get the more information about fuser, use the following command –$ fuserThe sample output should be like this –Usage: fuser [-fMuvw] [-a|-s] [-4|-6] [-c|-m|-n SPACE] [-k [-i] [-SIGNAL]] NAME... fuser -l fuser -V Show which processes use the named files, sockets, or filesystems. -a, --all             display unused files ... Read More

How to Install Webmin on Ubuntu

Sharon Christine
Updated on 22-Jan-2020 07:47:15

183 Views

Webmin is a web-based interface for system administration in Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd and lets you manage a system from the console or remotely. This article explains you about how to install Webmin on Ubuntu.To install Webmin open /etc/apt/sources.list  file as shown below-# sudo nano /etc/apt/sources.listThe sample output of the file should be like this –# deb cdrom:[Ubuntu 14.04.4 LTS _Trusty Tahr_ - Release amd64 (20160217.1)]/ trusty main restricted # See http://help.ubuntu.com/community/UpgradeNotes for ... Read More

How to Install Lynis 2.2.0 – Security Auditing Tool for Linux

Sharon Christine
Updated on 22-Jan-2020 06:37:33

141 Views

Lynis is a security audit tool for Unix and Linux based systems. It assists auditor in scanning the system and its security defenses helps in improving system hardening. This software will determine system information which is specific to OS type, installed packages, system and network configuration. Additionally, it will check the system for configuration errors and security issues. This article explains about how to install lynis on Ubuntu.FeaturesIt is an open sourceIt supported shell scriptNo dependenciesEasy to understandDynamic OS detectionIt supported 300+ built-in testsIt supports for custom testsPlugin supportIt supports compliance checksExtensive software supportInstalling of LynisLynis doesn’t required any installation, ... Read More

Fish – A Smart and User-Friendly Interactive Shell for Linux

karthikeya Boyini
Updated on 20-Jan-2020 09:49:51

106 Views

The Pleasant Interactive Shell which is called and abbreviated as FISH is a shell for UNIX and UNIX-like operating systems. It is a unique and innovative command line environment with a number of priceless improvements. Fish is designed to work with any other shell like bash or ZSH. Unlike different shells which disables more than a few elements with the aid of default to save process resource, FISH maintains all of them enabled by means of default in an effort to make most out of it.FeaturesIt is a User-friendly and interactive shellIt has so many powerful featuresInbuilt Web-based configurationIt supported ... Read More

Find the Largest Top 10 Files and Directories On a Linux

Sharon Christine
Updated on 20-Jan-2020 09:45:31

18K+ Views

Sometimes, it becomes important to find which files or directories are ingesting up, all of your disk area on a Linux. Similarly, we should be able to discover a particular directory location on file system such as /tmp/ or /var/ or /domestic/. This article will help you to use Unix and Linux commands for finding the most important or biggest files or directories on the file systems.Although, there is no shortcut command which is available to discover the largest documents/directories on a Linux/UNIX/BSD file system but there is a possibility which we will be showcasing you about.By aggregating the following ... Read More

Top 10 UNIX Command Line Mistakes

karthikeya Boyini
Updated on 17-Jan-2020 11:24:36

223 Views

As the saying goes – A man must be big enough to admit his mistakes, smart enough to profit from them, and strong enough to correct them. In IT world too mistakes are commonly done by new comers in the field due to inexperience. The Unix world is no different from the rest, and system admins unknowingly tend to commit some avoidable errors in their early days in the beginning of their career. Here are a few mistakes which are made by new system admins or users while working at UNIX prompt.This article explains the 10 most common Linux mistakes.userdel ... Read More

Performance Monitoring with Monitorix on Ubuntu 16.04

Sharon Christine
Updated on 17-Jan-2020 11:17:36

140 Views

Monitorix is a free, open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible. It has been created to be used under the production of Linux/UNIX servers but due to its simplicity and small size it can be used on embedded devices as well. This article explains about “How to install Minitorix on Ubuntu”.Adding the Monitorix RepositoryTo add the Monitorix Repository, open /etc/apt/sources.list file as shown below –$ sudo nano /etc/apt/sources.listThe sample output should be like this –# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted # See ... Read More

Linux and Unix Test Disk I/O Performance with DD Command

Sharon Christine
Updated on 17-Jan-2020 09:39:43

8K+ Views

Do you know how to check the performance of a hard drive like checking the read and write speed on your Linux operating systems? then, this article is for you!! which is basically created to provide you an overview of DD command, which is geared towards better guidance to new users and as an exploration tour for getting started to the Linux world.What is DD Command?DD is a command-line utility for Unix and Unix-like operating systems where the primary purpose is to copy a file and converting the format of the data during the process.How to Test Hard Disk using ... Read More

Advertisements