Search for a software/package to install using apt-cache
Answer:
To search for a software/package to install under Debian/Ubuntu is easy with apt-cache
# sudo apt-cache search php5-xdebug
php5-xdebug - Xdebug Module for PHP 5
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Search for a software/package to install using apt-cache
Answer:
To search for a software/package to install under Debian/Ubuntu is easy with apt-cache
# sudo apt-cache search php5-xdebug
php5-xdebug - Xdebug Module for PHP 5
Create a directory tree in Linux
Answer:
To create a directory tree, no matter if parent directories exist or not, e.g. /data/project/backup
# mkdir -p /data/project/backup
Replace a string using regular expressions in Perl
Answer:
The following code demo how to replace a string in Perl,
my $s = 'love foobar';
$s =~ s/love/hate/g;
print $s;
Match a string using regular expressions in Perl
Answer:
The following code demo how to match a string in Perl,
my $s = 'love foobar';
if ( $s =~ /foo/ ) {
print 'matched';
}
How to upgrade an installed RPM package
Answer:
To upgrade an installed RPM package under Red Hat/Fedora/CentOS
# rpm –Uvh package.rpm