Category Archives: Basics

cpio ( GNU )

CoPy In Out

Usage: cpio [OPTION…] [destination-directory]
GNU `cpio’ copies files to and from archives

Examples:
# Copy files named in name-list to the archive
cpio -o < name-list [> archive]
# Extract files from the archive
cpio -i [< archive]
# Copy files named in name-list to destination-directory
cpio -p destination-directory < name-list

Main operation mode:

-i, –extract
Extract files from an archive (run in copy-in
mode) -o, –create Create the archive (run in copy-out mode) -p, –pass-through Run in copy-pass mode

-t, –list Print a table of contents of the input

Operation modifiers valid in any mode:

–block-size=BLOCK-SIZE  Set the I/O block size to BLOCK-SIZE * 512
bytes
-B  Set the I/O block size to 5120 bytes
-c  Identical to “-H newc”, use the new (SVR4)
portable format.If you wish the old portable
(ASCII) archive format, use “-H odc” instead.
-C, –io-size=NUMBER  Set the I/O block size to the given NUMBER of
bytes
–force-local  Archive file is local, even if its name contains
colons
-f, –nonmatching Only copy files that do not match any of the given patterns
-F, –file=[[[email protected]]HOST:]FILE-NAME
Use this FILE-NAME instead of standard input or output. Optional USER and HOST specify the user and host names in case of a remote archive
-H, –format=FORMAT  Use given archive FORMAT
-M, –message=STRING  Print STRING when the end of a volume of the
backup media is reached
-n, –numeric-uid-gid In the verbose table of contents listing, show
numeric UID and GID
–quiet  Do not print the number of blocks copied
–rsh-command=COMMAND  Use remote COMMAND instead of rsh
-v, –verbose  Verbosely list the files processed
-V, –dot  Print a “.” for each file processed
-W, –warning=FLAG  Control warning display. Currently FLAG is one of
‘none’, ‘truncate’, ‘all’. Multiple options
accumulate.

Operation modifiers valid only in copy-in mode:

-b, –swap  Swap both halfwords of words and bytes of
halfwords in the data. Equivalent to -sS
-r, –rename  Interactively rename files
-s, –swapbytes Swap the bytes of each halfword in the files
-S, –swap-halfwords  Swap the halfwords of each word (4 bytes) in the
files
–to-stdout  Extract files to standard output

-E, –pattern-file=FILE  Read additional patterns specifying filenames to
extract or list from FILE
–only-verify-crc  When reading a CRC format archive, only verify the
checksum of each file in the archive, don’t
actually extract the files

Operation modifiers valid only in copy-out mode:

-A, –append  Append to an existing archive.
-O [[[email protected]]HOST:]FILE-NAME Archive filename to use instead of standard  output. Optional USER and HOST specify the user and host names in case of a remote archive

Operation modifiers valid only in copy-pass mode:

-l, –link  Link files instead of copying them, when
possible

Operation modifiers valid in copy-in and copy-out modes:

–absolute-filenames  Do not strip file system prefix components from
the file names
–no-absolute-filenames  Create all files relative to the current
directory

Operation modifiers valid in copy-out and copy-pass modes:

-0, –null  A list of filenames is terminated by a null
character instead of a newline
-a, –reset-access-time  Reset the access times of files after reading
them
-I [[[email protected]]HOST:]FILE-NAME  Archive filename to use instead of standard input. Optional USER and HOST specify the user and host
names in case of a remote archive
-L, –dereference  Dereference symbolic links (copy the files
that they point to instead of copying the links).
-R, –owner=[USER][:.][GROUP]  Set the ownership of all files created to the specified USER and/or GROUP

Operation modifiers valid in copy-in and copy-pass modes:

-d, –make-directories  Create leading directories where needed
-m, –preserve-modification-time
Retain previous file modification times when creating files
–no-preserve-owner  Do not change the ownership of the files
–sparse  Write files with large blocks of zeros as sparse
files
-u, –unconditional  Replace all files unconditionally

-?, –help  give this help list
–usage  give a short usage message
–version  print program version

Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.

Report bugs to <[email protected]>.

Share

What is Hadoop ? Facts you must know about Apache Hadoop

Apache hadoop

What Is Hadoop?
Apache Hadoop is an open source software frame work developed by Apache Hadoop Project.
The framework allows distributed data processing spread over a large number of computers.
Hadoop 2.x is the latest version with major changes in its architecture & current release is 2.3.0 , released on 20 February, 2014.

Share

Linux & Unix Date Format Examples

Learn about Linux and Unix date & time formating with the help of simple explanation and added example. Date command in Unix & Linux is used to format date as well as time. First portion of this article covers Date  function and the second portion has the  time function covered.

Share

Php Date Format

Date time formatting in PHP
Many scripts written in php need date and time function . PHP has many predfined date formats and you can also customized it as per your need .
Here are some of the date format examples and additional details for php.

Share

ssh Without Password in Few Simple Steps

How to configure passwordless ssh & sftp access in Unix & Linux systems? Follow these simple steps with examples with a basic troubleshooting section at the end. sftp uses underlying ssh access for authentication and after you establish passwordless ssh access you will have passwordless sftp access a s well.

This a real life example of configuring passwordless access for two users . The user ‘web’ in this case needs a secure password less access to another user james in a server ‘devserver’
.

Share

Geek Speaks

Geek Speaks – collection of previous geek speaks
SE, HVD, LVD SCSI interfaces
CIDR : Classless Inter-Domain Routing
Priority Paging
FSSTABLE
umask
Dynamic System Domains

Share

Unix Tutorial – Learn Unix OS Basics to get started

This is a Unix Tutorial where you can learn Unix OS Basics to get started with UNIX and Linux operating systems and covers Unix Directory structure , Unix Commads and Unix Shells

Share

Backup Commands in Linux & Unix with Usage and Examples

Unix and Linux backup and restore can be done using backup commands tar, cpio ufsdump, dump and restore. Though these commands may be sufficient for small setups in order to take a enterprise backup you have to go in for some custom backup and restore solutions like Symatic netbackup, EMC networker or Amanda.
Any backup solution using these commands depends on the type of backup you are taking as these backup commands offers different capabilities.

Share

Crontab – Quick Reference

Setting up cron jobs in Unix, Solaris & Linux

cron is a unix, solaris, Linux utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. 

Share

Unix Commands Tutorial

Learn about the Unix commands with their usages and examples.
This Unix command tutorial introduces you with some of the most popular and useful commands used in nix operating system to get you started with Unix.
All Unix OS comes with online manual system, man, which can be used used as ,man , to get more details and complete set of options.

Share

Solaris Installation

Solaris installation poses a challenges to the new Solaris sysadmins who have never done the installation of Solaris before . Though the installation itself is simple and straight forward but doing it the first time comes with its own anxiety associated with unexplored and unknown things .

Share

Unix Tech Tips

  1. Running Sol
    aris  in 32 or 64 bit mode
    – Page 1
  2. Removing ^M from Unix text files – Page 2
  3. Backup commands – ufsdump , tar , cpio – Page 3
  4. Setting up Ethernet card speed & duplex mode – Page 4
  5. One Line scripts – Page 4
Share

vi editor Quick Reference

 

Introduction

Learn about the default text editor, vi, pronounced as ”vee eye”, in Unix, Linux and other Unix like systems. A short, concise vi quick reference lets you get started with vi today. Explains vi editor mode &  vi commands with examples for editing in vi.

Share

Booting Process in Solaris

Understanding the booting process is important in the sense that you can get a clear idea when a system faces a booting problem if you are familiar with the booting sequence and steps involved. You can thereby isolate a booting phase and quickly resolve the issues.

Share

DNS Troubleshooting

DNS troubleshooting , this article describes some of the common dns problems and their solutions.
First phase of article describes dns errors relating to configuration , server setup and its basic functionality . Second phase talks about the nslookup related errors when the dns servers seems to be working correctly but names resolution fail .

Share