Coding

I have to clean this up.

  • coding
  • php
  • sql
  • webhosts
  • joomla tips. 

This section is a reflection of my coding skills -- cut and paste, and hastily thrown together. Most of this is copied from other sites -- just so I have fast reference here.
If it belongs to you - sorry. Let me know. Though most has attribution. ;-)

This is all you need.

find . -name "foo*"

find needs a starting point, and the . (dot) points to the current directory.

Condition flow

\! -name "*.c"
\( x -or y \)

Actions

-exec rm {} \;
-print
-delete

Examples

find . -name '*.jpg'
find . -name '*.jpg' -exec rm {} \;
find . -newerBt "24 hours ago"

 

Read more: Simple Linux Find Commands

  • Service parameters are:
    SigPlusNovoServiceParameters Object
    (
        [multilingual] => 
        [base_folder] => /var/www/lrioco6/public_html/images
        [base_url] => /images
        [folder_thumb] => thumbs
        [folder_preview] => preview
        [folder_fullsize] => fullsize
        [folder_watermarked] => watermarked
        [folder_script] => script
        [cache_image] => cache
        [cache_content] => 1
        [metadata_filter] => default
        [library_image] => gd
        [debug_client] => 
        [debug_server] => verbose
        [clean_database] => 
        [settings] => 
    )
    
  • Default gallery parameters are:
    SigPlusNovoGalleryParameters Object
    (
        [base_module] => 
        [lightbox] => boxplus/light
        [rotator] => slideplus
        [caption] => captionplus
        [id] => 
        [source] => 
        [layout] => fixed
        [rows] => 1
        [cols] => 3
        [limit] => 
        [maxcount] => 0
        [preview_width] => 200
        [preview_height] => 200
        [preview_crop] => 1
        [preview_retina_scale] => 2
        [thumb_width] => 60
        [thumb_height] => 60
        [thumb_crop] => 1
        [thumb_retina_scale] => 2
        [quality] => 85
        [alignment] => left-clear
        [lightbox_autocenter] => 1
        [lightbox_autofit] => 1
        [lightbox_thumbs] => inside
        [lightbox_slideshow] => 0
        [lightbox_autostart] => 
        [lightbox_transition] => sine
        [rotator_orientation] => horizontal
        [rotator_navigation] => bottom
        [rotator_buttons] => 
        [rotator_links] => 
        [rotator_trigger] => click
        [rotator_step] => single
        [rotator_duration] => 800
        [rotator_delay] => 0
        [rotator_alignment] => c
        [rotator_transition] => sine
        [loop] => 1
        [caption_visibility] => mouseover
        [caption_position] => overlay-bottom
        [caption_height] => 
        [caption_source] => labels.txt
        [caption_title] => 
        [caption_summary] => 
        [caption_title_template] => 
        [caption_summary_template] => {$text} ({$current}/{$total})
        [download] => 
        [metadata] => 
        [protection] => 
        [preview_margin] => 4px
        [preview_border_width] => 
        [preview_border_style] => none
        [preview_border_color] => 
        [preview_padding] => 10px
        [sort_criterion] => 3
        [sort_order] => 1
        [depth] => 0
        [watermark_position] => 
        [watermark_x] => 0
        [watermark_y] => 0
        [watermark_source] => watermark.png
        [index] => 1
        [filter_include] => SigPlusNovoFilter Object
            (
                [rel] => and
                [items] => Array
                    (
                    )
    
            )
    
        [filter_exclude] => SigPlusNovoFilter Object
            (
                [rel] => and
                [items] => Array
                    (
                    )
    
            )
    
        [open_graph] => 1
        [target_media] => display
        [classname] => 
        [mobile_params] => Array
            (
            )
    
        [lightbox_params] => Array
            (
            )
    
        [rotator_params] => Array
            (
            )
    
        [caption_params] => Array
            (
            )
    
        [settings] => 
    )
    
  • Local gallery parameters for "sigplus_1001" are:
    SigPlusNovoGalleryParameters Object
    (
        [base_module] => 
        [lightbox] => boxplus/light
        [rotator] => slideplus
        [caption] => captionplus
        [id] => sigplus_1001
        [source] => 
        [layout] => fixed
        [rows] => 1
        [cols] => 3
        [limit] => 
        [maxcount] => 0
        [preview_width] => 200
        [preview_height] => 200
        [preview_crop] => 1
        [preview_retina_scale] => 2
        [thumb_width] => 60
        [thumb_height] => 60
        [thumb_crop] => 1
        [thumb_retina_scale] => 2
        [quality] => 85
        [alignment] => left-clear
        [lightbox_autocenter] => 1
        [lightbox_autofit] => 1
        [lightbox_thumbs] => inside
        [lightbox_slideshow] => 0
        [lightbox_autostart] => 
        [lightbox_transition] => sine
        [rotator_orientation] => horizontal
        [rotator_navigation] => bottom
        [rotator_buttons] => 
        [rotator_links] => 
        [rotator_trigger] => click
        [rotator_step] => single
        [rotator_duration] => 800
        [rotator_delay] => 0
        [rotator_alignment] => c
        [rotator_transition] => sine
        [loop] => 1
        [caption_visibility] => mouseover
        [caption_position] => overlay-bottom
        [caption_height] => 
        [caption_source] => labels.txt
        [caption_title] => 
        [caption_summary] => 
        [caption_title_template] => 
        [caption_summary_template] => {$text} ({$current}/{$total})
        [download] => 
        [metadata] => 
        [protection] => 
        [preview_margin] => 4px
        [preview_border_width] => 
        [preview_border_style] => none
        [preview_border_color] => 
        [preview_padding] => 10px
        [sort_criterion] => 3
        [sort_order] => 1
        [depth] => 0
        [watermark_position] => 
        [watermark_x] => 0
        [watermark_y] => 0
        [watermark_source] => watermark.png
        [index] => 1
        [filter_include] => SigPlusNovoFilter Object
            (
                [rel] => and
                [items] => Array
                    (
                    )
    
            )
    
        [filter_exclude] => SigPlusNovoFilter Object
            (
                [rel] => and
                [items] => Array
                    (
                    )
    
            )
    
        [open_graph] => 1
        [target_media] => display
        [classname] => 
        [mobile_params] => Array
            (
            )
    
        [lightbox_params] => Array
            (
            )
    
        [rotator_params] => Array
            (
            )
    
        [caption_params] => Array
            (
            )
    
        [settings] => 
    )
    
  • Generating gallery "sigplus_1001" from folder: /var/www/lrioco6/public_html/images/cheatsheets
  • Folder /var/www/lrioco6/public_html/images/cheatsheets has not changed.
  • Folder view [id=2] has not changed.

Read more: Cheat Sheets

The tar Command
tar --exclude='folder'--exclude='upload/folder2'-zcvf /backup/filename.tgz

The tar (tape archive) command bundles a bunch of files together and creates an archive (commonly called a tar file or tarball) on a tape, disk drive, or floppy disk. The original files are not deleted after being copied to the tar file. To create an archive using tar, use a command like this, which bundles all the files in the current directory that end with .doc into the alldocs.tar file:

tar cvf alldocs.tar *.doc

Here's a second example,

Read more: Tar Commands

This is a linux command line reference for common operations.
Examples marked with • are valid/safe to paste without modification into a terminal, so
you may want to keep a terminal window open while reading this so you can cut & paste.
All these commands have been tested both on Fedora and Ubuntu.

Read more: Command Line Reference

Subcategories

Other sites hosted by L Rio.