Posts

Unix: To check when last a password was changed

 [root@pshrps601 ~]# chage -l psoft Last password change                                    : May 24, 2010 Password expires                                        : never Password inactive                                       : never Account expires                                         : never Minimum number of days between password change          : -1 Maximum number of days between password change          : -1 Number of days of warning before password expires       : -1 [root@pshrps601 ~]#

Db2: List backups taken backup

 db2 list history backup since 20251022 for db wcdev2

Postgres: To get list of partitions and the owner

  SELECT nmsp_parent.nspname AS parent_schema, parent.relname AS parent, nmsp_child.nspname AS child_schema, child.relname AS child FROM pg_inherits JOIN pg_class parent ON pg_inherits.inhparent = parent.oid JOIN pg_class child ON pg_inherits.inhrelid = child.oid JOIN pg_namespace nmsp_parent ON nmsp_parent.oid = parent.relnamespace JOIN pg_namespace nmsp_child ON nmsp_child.oid = child.relnamespace WHERE parent.relname = 'parent_table_name' ;