tips.paddyonline.net

If you need tips & tricks, here they are...


Warning: Parameter 2 to modChrome_artnostyle() expected to be a reference, value given in /var/www/clients/client1/web13/web/templates/tips2_4/html/modules.php on line 39

Warning: Parameter 3 to modChrome_artnostyle() expected to be a reference, value given in /var/www/clients/client1/web13/web/templates/tips2_4/html/modules.php on line 39

Joomla! AddThis

Share

Other Generic

Compare time on two files in (T)CSH

Compare time on two files in (T)CSH

I really don't like BASH or SH so I try to find ways not to use it.

This is what I came up to for use instead of [< file > -lt < file2 >] compare

if ( (-M < file1 >) >= (-M < file2 > ) )

Read more: Compare time on two files in (T)CSH

Find and Replace in many files

Find and Replace in many files

This is to describe how you can find and replace a text in many many files at once. It might take some time .. but it will do the job.

The FIND and SED way

find . -type f -exec sed -i 's/OLDSTRING/NEWSTRING/g' {} \;

Example

find . -type f -exec sed -i 's/\/usr\/local\/home/\/usr\/local\/new\/home/g' {} \;
find . -type f -exec sed -i 's/Beelzebub/God/g' {} \;

Observe that paths or text with a / in them need the / to be escaped(\) for sed to accept it as a / and not end of statement.

Rsync

Rsync

Rsync is one of those utilities that doesn't come nativity normally. Some flavors do install it during installation of the operating system while others demand you to install it.

You don't have to install it but it is good if you need to do some special tasks.

It's meant as a utility to synchronize two directories which in turn can be done in various ways. It can do it between two servers/computers or between two local directories or even as a server for others to synchronize with your local package.

Read more: Rsync

Please consider supporting our efforts.

:

Warning: Parameter 2 to modChrome_artnostyle() expected to be a reference, value given in /var/www/clients/client1/web13/web/templates/tips2_4/html/modules.php on line 39

Warning: Parameter 3 to modChrome_artnostyle() expected to be a reference, value given in /var/www/clients/client1/web13/web/templates/tips2_4/html/modules.php on line 39
Creative Commons License
Tips&Tricks at tips.paddyonline.net is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok Decline