Archive for the tag 'linux'

SBDavid

Linux Login shell

When you log in to the Linux system, the bash shell starts as a login shell. The login shell looks for four different startup files to process commands from. The order in which the bash shell processes the files are:

/etc/profile
$HOME/.bash profile
$HOME/.bash login
$HOME/.profile

The /etc/profile file is the main default startup file for the bash shell on the system. Every user on the system executes this startup file when they log in. The other three startup files are specific for each user and can be customized for each user’s requirements.

Most popular archiving tool used in Unix and Linux is the tar command.

The tar command was originally used to write files to a tape device for archiving. However, it can also write the output to a file, which has become a popular way to archive data in Linux.

-c –create create a new archive
-d –diff, –compare find differences between archive and file system
–delete delete from the archive (not for use on mag tapes!)
-r –append append files to the end of an archive
-t –list list the contents of an archive
-u –update only append files that are newer than copy in archive
-x –extract, –get extract files from an archive

tar command is a simple way to create archive files of entire directory structures. This is a common method for distributing source code files for open source applications in the Linux world.

SBDavid

proc pseudo-filesystem in Linux

proc pseudo-filesystem in Linux

proc-pseudo-filesystem in Linux The Linux process pseudo-filesystem, the /proc directory. Every process on the system has a directory here with its name on it, inside of which lies many things — including an fd (”file descriptor”) subdirectory containing links to all files that the process has open. Even if a file has been removed from the filesystem, a copy of the data will be righ there:

/proc/process id/fd/file descriptor

To know where to go, you need to get the id of the process that has the file open, and the file descriptor. These you get with lsof, whose name means “list open files.” (It actually does a whole lot more than this and is so useful that almost every system has it installed. If yours isn’t one of them, you can grab the latest version straight from its author.)

lsof - list open files

Kinds of device files in Linux operating systems

There are two general kinds of device files in Unix-like operating systems, known as character special files and block special files. The difference between them lies in how data written to them and read from them is processed by the operating system and hardware.

These together can be called device special files in contrast to named pipes, which are not connected to a device but are not ordinary files either.

Symbol Meaning
- Regular file
d Directory
l Link
c Special file
s Socket
p Named pipe
b Block device

Settings for ifcfg-eth0

The /etc/sysconfig/network-scripts/ifcfg-eth0 file should have the following.

—/etc/sysconfig/network-scripts/ifcfg-eth0 begin file–
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=IP_address_host_server
NETMASK=netmask_value (please check with your service provider)
GATEWAY=ip_address_gateway
—/etc/sysconfig/network-scripts/ifcfg-eth0 end file–

Before you use Parallels Pro Control Panel to perform provisioning or management operations, you must provide the license key information, if you have not provided the information at the time of installation. You receive the license key in the order confirmation email when you buy Parallels Pro Control Panel.

« Prev - Next »