Showing posts with label SystemAdmin. Show all posts
Showing posts with label SystemAdmin. Show all posts

Wednesday, January 25, 2017

Find files with specific extensions in current directory

Find files with specific extensions in current directory (you can add multiple extensions as per syntax

find . -type f \( -name "*.sh" -o -name "*.txt" \)
find /home/bhsingh/ -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.deb" -o -name ".pdf" \)

Find file & redirec the result to a file

find /home/www/html -type f \( -name "*.php"\) -print0 | xargs -0 stat --format '%Z :%z %n' | sort -nr > /home/bhsingh/php_files.txt
find / -type f -print0 | xargs -0 stat --format '%Z :%z %n' | sort -nr > /root/all_files.txt

Tuesday, January 24, 2017

Not able to install googleads-php-lib on Centos

[bhagwat@server1 googleads-php-lib-25.1.0]$ php composer.phar require googleads/googleads-php-lib

Using version ^25.1 for googleads/googleads-php-lib
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package googleads/googleads-php-lib No version set (parsed as 1.0.0) is satisfiable by googleads/googleads-php-lib[No version set (parsed as 1.0.0)] but these conflict with your requirements or minimum-stability.


Solution

Issue was resolved after upgrading composer with below command

php composer.phar update

(Composer seems not to be able to detect the version of the library and thus cannot install the library of v25.1 as requested.)