Install Rar/UnRar Support & Open Rar Archives In Ubuntu

Ubuntu Archive Manager can not open rar file by default in your Ubuntu. Because of the proprietary issue rar support package not included in Ubuntu distribution. However rar support installtion in very easy with apt-get package mamager. Follow these steps to install Rar Support in your Ubuntu Linux Distribution. Open…continue reading →
Gallary2 Platform Failure Error Fix

Gallary2 Platform Failure Error Fix

This is common error occur due to wrong permission setting in Gallery2 data directory.? During module uninstall, gallery2 restore directory permission and other changes as it was before the module installation. This feature sometime break gallery directory permission and directory does not work.? See Image bellow for exact error description.…continue reading →

Uber Uploader ClipShare Rayzz Ostube Failed to Find File Length Error

You may receive "Failed To Find Flength File" error during file upload using uber uploader. The main cause of this problem is due to apache mod_security enabled on your host. Apache mod_security may prevent writing flength file duing file upload. This will cause uploder to determine file length for percentage…continue reading →
How to add php code to word press blog widget

How to add php code to word press blog widget

Word Press default widget does not allow you to use php code. You can do this by simply editing template files but this is not overall solution. By doing this you are loosing beauty of widget drag and drop functionality. The Samsarin PHP Widget available as plug-in that allow user…continue reading →

Linux / Unix tar command

Tar is commonly used archive in Linux/Unix platform. Tar is capable to create new archive and can add or extract files files in a archive .Syntaxtar c [ bBeEfFhiklnopPqvwX [ 0-7 ] ] [ block ] [ tarfile ] [ exclude-file ] {-I include-file | -C directory | file | file }tar r [ bBeEfFhiklnqvw [ 0-7 ] ] [ block ] {-I include-file | -C directory | file | file }tar t [ BefFhiklnqvX [ 0-7 ] ] [ tarfile ] [ exclude-file ] {-I include-file | file } ...tar u [ bBeEfFhiklnqvw [ 0-7 ] ] [ block ] [ tarfile ] file ...tar x [ BefFhiklmnopqvwX [ 0-7 ] ] [ tarfile ] [ exclude-file ] [ file ... ]Switches
Create. Writing begins at the beginning of the tarfile, instead of at the end.
rReplace. The named file s are written at the end of the tarfile. A file created with extended headers must be updated with extended headers (see E flag under Function Modifiers). A file created without extended headers cannot be modified with extended headers.
tTable of Contents. The names of the specified files are listed each time they occur in the tar file. If no file argument is given, the names of all files in the tarfile are listed. With the vfunction modifier, additional information for the specified files is displayed.
uUpdate. The named file s are written at the end of the tarfile if they are not already in the tar file, or if they have been modified since last written to that tarfile. An update can be rather slow. A tarfile created on a 5.x system cannot be updated on a 4.x system. A file created with extended headers must be updated with extended headers (see E flag under Function Modifiers). A file created without extended headers cannot be modified with extended headers.
xExtract or restore. The named file s are extracted from the tarfile and written to the directory specified in the tarfile, relative to the current directory. Use the relative path names of files and directories to be extracted. If a named file matches a directory whose contents has been writ ten to the tarfile, this directory is recursively extracted. The owner, modification time, and mode are restored (if possible); otherwise, to restore owner, you must be the super-user. Character special and block-special devices (created by mknod(1M)) can only be extracted by the super user. If no file argument is given, the entire content of the tarfile is extracted. If the tar- file contains several files with the same name, each file is written to the appropriate directory, overwriting the previous one. Filename substitu tion wildcards cannot be used for extracting files from the archive; rather, use a command of the form:tar xvf... /dev/rmt/0 `tar tf... /dev/rmt/0 | grep 'pattern' `When extracting tapes created with the r or u functions, directory modification times may not be set correctly. These same functions cannot be used with many tape drives due to tape drive limitations such as the absence of backspace or append capabilities.When using the r, u, or x functions or the X function modifier, the named files must match exactly the corresponding files in the tarfile. For example, to extract ./thisfile, you must specify ./thisfile, and not thisfile. The t function displays how each file was archived.
bBlocking Factor. Use when reading or writing to raw magnetic archives (see f below). The block argument specifies the number of 512-byte tape blocks to be included in each read or write operation performed on the tarfile. The minimum is 1, the default is 20. The maximum value is a function of the amount of memory available and the blocking requirements of the specific tape device involved (see mtio(7I) for details.) The maximum cannot exceed INT_MAX/512 (4194303).When a tape archive is being read, its actual blocking factor will be automatically detected, provided that it is less than or equal to the nominal blocking factor (the value of the block argument, or the default value if the b modifier is not specified). If the actual blocking factor is greater than the nominal blocking factor, a read error will result. See Example 5 in Examples.
BBlock. Force tar to perform multiple reads (if necessary) to read exactly enough bytes to fill a block. This function modifier enables tar to work across the Ethernet, since pipes and sockets return partial blocks even when more data is coming. When reading from standard input, '-', this function modifier is selected by default to ensure that tar can recover from short reads.
eError. Exit immediately with a positive exit status if any unexpected errors occur. The SYSV3 environment variable overrides the default behavior. (See ENVIRONMENT section below.)
EWrite a tarfile with extended headers. (Used with c, r, or u options; ignored with t or x options.) When a tarfile is written with extended headers, the modification time is maintained with a granularity of microseconds rather than seconds. In addition, filenames no longer than PATH_MAX characters that could not be archived without E, and file sizes greater than 8GB, are supported. The E flag is required whenever the larger files and/or files with longer names, or whose UID/GID exceed 2097151, are to be archived, or if time granularity of microseconds is desired.
fFile. Use the tarfile argument as the name of the tarfile. If f is specified, /etc/default/tar is not searched. If f is omitted, tar will use the device indicated by the TAPE environment variable, if set; otherwise, it will use the default values defined in /etc/default/tar. If the name of the tarfile is '-', tar writes to the standard output or reads from the standard input, whichever is appropriate. tar can be used as the head or tail of a pipeline. tar can also be used to move hierarchies with the command:example% cd fromdir; tar cf - .| (cd todir; tar xfBp -)
FWith one F argument, tar excludes all directories named SCCS and RCS from the tarfile. With two arguments, FF, tar excludes all directories named SCCS and RCS, all files with .o as their suffix, and all files named errs, core, and a.out. The SYSV3 environment variable overrides the default behavior. (See ENVIRONMENT section below.)
hFollow symbolic links as if they were normal files or directories. Normally, tar does not follow symbolic links.
iIgnore directory checksum errors.
-j, --bzip2filter archive through bzip2, use to decompress .bz2 files. WARNING: some previous versions of tar used option -I to filter through bzip2. When writing scripts, use --bzip2 instead of -j so that both older and newer tar versions will work.
k sizeRequires tar to use the size argument as the size of an archive in kilobytes. This is useful when the archive is intended for a fixed size device such as floppy disks. Large files are then split across volumes if they do not fit in the specified size.
lLink. Output error message if unable to resolve all links to the files being archived. If l is not specified, no error messages are printed.
mModify. The modification time of the file is the time of extraction. This function modifier isvalid only with the x function.
nThe file being read is a non-tape device. Reading of the archive is faster since tar can randomly seek around the archive.
oOwnership. Assign to extracted files the user and group identifiers of the user running the program, rather than those on tarfile. This is the default behavior for users other than root. If the o function modifier is not set and the user is root, the extracted files will take on the group and user identifiers of the files on tarfile. The o function modifier is only valid with the x function.
pRestore the named files to their original modes, and ACLs if applicable, ignoring the present umask. This is the default behavior if invoked as super-user with the x function letter specified. If super-user, SETUID and sticky information are also extracted, and files are restored with their original owners and permissions, rather than owned by root. When this function modifier is used with the c function, ACLs are created in the tarfile along with other information. Errors will occur when a tarfile with ACLs is extracted byprevious versions of tar .
PSuppress the addition of a trailing "/" on directory entries in the archive.
qStop after extracting the first occurrence of the named file. tar will normally continue reading the archive after finding an occurrence of a file.
vVerbose. Output the name of each file preceded by the function letter. With the t function, v provides additional information about the tarfile entries. The listing is similar to the format produced by the -l option of the ls command.
wWhat. Output the action to be taken and the name of the file, then await the user's confirmation. If the response is affirmative, the action is performed; otherwise, the action is not performed. This function modifier cannot be used with the t function.
XExclude. Use the exclude-file argument as a file containing a list of relative path names for files (or directories) to be excluded from the tarfile when using the functions c, x, or t. Be careful of trailing white spaces. Also beware of leading white spaces, since, for each line in the excluded file, the entire line (apart from the newline) will be used to match against the initial string of files to exclude. Multiple X arguments may be used, with one exclude-file per argument. In the case where included files (see -I include-file option) are also specified, the excluded files take precedence over all included files. If a file is specified in both the exclude-file and the include-file (or on the command line), it will be excluded.
[0-7]Select an alternative drive on which the tape is mounted. The default entries are specified in /etc/default/tar. If no digit or f function modifier is specified, the entry in /etc/default/tar with digit "0" is the default.
-I include-fileOpens include-file containing a list of files, one per line, and treats it as if each file appeared separately on the command line. Be careful of trailing white spaces. Also beware of leading white spaces, since, for each line in the included file, the entire line (apart from the newline) will be used to match against the initial string of files to include. In the case where excluded files (see X function modifier) are also specified, they take precedence over all included files. If a file is specified in both the exclude-file and the include-file (or on the command line), it will be excluded.
-C directory filePerforms a chdir (see cd(1)) operation on directory and performs the c (create) or r (replace) operation on file . Use short relative path names for file . If file is `.', archive all files in directory. This option enables archiving files from multiple directories not related by a close common parent.
fileA path name of a regular file or directory to be archived (when the c, r or u functions are specified), extracted (x) or listed (t). When file is the path name of a directory, the action applies to all of the files and (recursively) subdirectories of that directory. When a file is archived, and the E flag (see Function Modifiers) is not specified, the filename cannot exceed 256 characters. In addition, it must be possible to split the name between parent directory names so that the prefix is no longer than 155 characters and the name is no longer than 100 characters. If E is specified, a name of up to PATH_MAX characters may be specified.For example, a file whose basename is longer than 100 characters could not be archived without using the E flag. A file whose directory portion is 200 characters and whose basename is 50 characters could be archived (without using E) if a slash appears in the directory name somewhere in character positions 151-156.
Examples:tar -cvvf mp3.tar *.mp3 Create mp3.tar from from all the mp3 files of current directory.tar -xvvf mp3.tar Extract mp3.tar file in the current directory.tar -xvvzf mp3.tar.gz Extract mp3.tar.gz file in the current directory.

How to extract .gz file content by gunzip utility

Like the windows, gz is common compression utility in Linux. This guide is to extract content of the .gz file by gunzip utility. Here is the command to see and extract content of the gz file.
View gz file contentgunzip -c mybackup.gzExtract file file content in another file. you can use different file extension depend on the content of file.gunzip -c mybackup.gz > mybackup.sql
Compress the mybackup.sql file as mybackup.gz in the current directory.gunzip -c mybackup.sql > mybackup.gz
Here is the full details of the gzip command. Syntax gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ... ]
-a--asciiAscii text mode: convert end-of-lines using local conventions. This option is supported only on some non-Unix systems. For MSDOS, CR LF is converted to LF when compressing, and LF is converted to CR LF when decompressing.
-c--stdout--to-stdoutWrite output on standard output; keep original files unchanged. If there are several input files, the output consists of a sequence of independently compressed members. To obtain better compression, concatenate all input files before compressing them.
-d--decompress--uncompressDecompress.
-f--forceForce compression or decompression even if the file has multiple links or the corresponding file already exists, or if the compressed data is read from or written to a terminal. If the input data is not in a format recognized by gzip, and if the option --stdout is also given, copy the input data without change to the standard ouput: let zcat behave as cat. If -f is not given, and when not running in the back ground, gzip prompts to verify whether an existing file should be overwritten.
-h--helpDisplay a help screen and quit.
-l--listFor each compressed file, list the following fields:
compressed size: size of the compressed fileuncompressed size: size of the uncompressed fileratio: compression ratio (0.0% if unknown)uncompressed_name: name of the uncompressed file
The uncompressed size is given as -1 for files not in gzip format, such as compressed .Z files. To get the uncompressed size for such a file, you can use:
zcat file.Z | wc -c
In combination with the --verbose option, the following fields are also displayed:
method: compression methodcrc: the 32-bit CRC of the uncompressed datadate & time: time stamp for the uncompressed file
The compression methods currently supported are deflate, compress, lzh (SCO compress -H) and pack. Thecrc is given as ffffffff for a file not in gzip format.With --name, the uncompressed name, date and time are those stored within the compress file if present.With --verbose, the size totals and compression ratio for all files is also displayed, unless some sizes are unknown. With --quiet, the title and totals lines are not displayed.
-L--licenceDisplay the gzip license and quit.
-n--no-nameWhen compressing, do not save the original file name and time stamp by default. (The original name is always saved if the name had to be truncated.) When decompressing, do not restore the original file name if present (remove only the gzip suffix from the compressed file name) and do not restore the original time stamp if present (copy it from the compressed file). This option is the default when decompressing.
-N--nameWhen compressing, always save the original file name and time stamp; this is the default. When decompressing, restore the original file name and time stamp if present. This option is useful on systems which have a limit on file name length or when the time stamp has been lost after a file transfer.
-q-quietSuppress all warnings.
-r--recursiveTravel the directory structure recursively. If any of the file names specified on the command line are directories, gzip will descend into the directory and compress all the files it finds there (or decompress them in the case of gunzip ).
-S .suf--suffix .sufUse suffix .suf instead of .gz. Any suffix can be given, but suffixes other than .z and .gz should be avoided to avoid confusion when files are transferred to other systems. A null suffix forces gunzip to try decompression on all given files regardless of suffix, as in:gunzip -S "" * (*.* for MSDOS)Previous versions of gzip used the .z suffix. This was changed to avoid a conflict with pack.
-t--testTest. Check the compressed file integrity.
-v-verboseVerbose. Display the name and percentage reduction for each file compressed or decompressed.
-V--versionVersion. Display the version number and compilation options then quit.
-#--fast--bestRegulate the speed of compression using the specified digit #, where -1 or --fast indicates the fastest compression method (less compression) and -9 or --best indicates the slowest compression method (best compression). The default compression level is -6 (that is, biased towards high compression at expense of speed).

How to run FFMPEG command in Asp.Net

To run ffmpeg commands in asp.net you need to use Media Handler class. Here is an example how to use media handler class to run ffmpeg commands. //Create media handler object of Media_handler class Media_handler mymediahandler=new Media_handler(); // Get web site application path string webapppath =Server.MapPath(Request.ApplicationPath); //Get ffmpeg.exe full path…continue reading →
Compile and Build FFMPEG on Windows Platform

Compile and Build FFMPEG on Windows Platform

Installing FFMPEG from the source in window platform is easy as you do for other window application. Here is the complete instructios how to build FFMPEG in windows. To install FFMPEG on windows you need to install third party MinGW and MSys library that is compatible with GCC. This library…continue reading →
Clip-Share Upload Video Internal Server Error

Clip-Share Upload Video Internal Server Error

Clip-Share is mature script to run your own video sharing website like YouTube. This script is available variety of features and options at low cost. Unfortunately, they don't have good knowledge base to short out technical problems related to script installation. The common problem with Clipshare and other video sharing…continue reading →

Setting up website in WHM server

WHM? is a Web Host Manager tool that allows server administrators to quickly and easily add new web hosting accounts on a WHM enabled Web server.? Here is steps to create new hosting account without hassle. Log into WHM account with your username and password. Click the Create a New…continue reading →