To reset UID/GID on all files:
# for i in $(rpm -qa); do rpm --setugids $i; done
To reset permissions on all files:
# for i in $(rpm -qa); do rpm --setperms $i; done
A log of what I've been doing with various unix systems
To reset UID/GID on all files:
# for i in $(rpm -qa); do rpm --setugids $i; done
To reset permissions on all files:
# for i in $(rpm -qa); do rpm --setperms $i; done
Ctrl-Alt-Enter
$ sudo head /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 7 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch failovermethod=priority enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 exclude=synergy* $This is another one of those posts I do to remind myself about what I did.
I ran the following on a RHEL7.1 system to make a RHEL7.1 bootable ISO.
[root@box iso]# ls -lh rhel-server-7.1-x86_64-dvd.iso -rw-rw-r--. 1 qemu qemu 3.7G Mar 17 11:09 rhel-server-7.1-x86_64-dvd.iso [root@box iso]# [root@box iso]# growisofs -dvd-compat -Z /dev/cdrom=rhel-server-7.1-x86_64-dvd.iso Executing 'builtin_dd if=rhel-server-7.1-x86_64-dvd.iso of=/dev/cdrom obs=32k seek=0' /dev/cdrom: "Current Write Speed" is 8.2x1352KBps. 15204352/3890216960 ( 0.4%) @3.1x, remaining 21:14 RBU 100.0% UBU 10.0% ... 3864657920/3890216960 (99.3%) @7.3x, remaining 0:03 RBU 100.0% UBU 100.0% builtin_dd: 1899520*2KB out @ average 5.4x1352KBps /dev/cdrom: flushing cache /dev/cdrom: updating RMA /dev/cdrom: closing disc /dev/cdrom: reloading tray [root@box iso]#
I think growisofs has a slightly confusing name and an odd syntax.
#!/usr/bin/env python
# Filename: unpack.py
# Description: This code will unpack a python object
# Supported Langauge(s): Python 2.7.x
# Time-stamp: <2015-03-18 18:41:56 none>
# -------------------------------------------------------
# I had to figure this out twice I am logging it this time.
# -------------------------------------------------------
# Suppose we have some object...
class FirstClass:
def setdata(self, value):
self.data = value
def display(self):
print self.data
# ...and someone instantiated it
x = FirstClass()
y = FirstClass()
x.setdata("King Arthur")
y.setdata(3.14159)
# If someone hands it to me and I want to know what inside
# it, then printing it just gives me something like
# <__main__.FirstClass instance at 0x7f794fab7b00>
print x
# Since I have the code to the class I can just use the
# display method.
x.display()
# But what if I don't know about the dispaly method?
# Is there some way I an unpack any arbitrary object?
vars(x)
# The above returns {'data': 'King Arthur'} .
# For a more complicated object you can pprint it.
from pprint import pprint
pprint (vars(x))
Try dir([object]) too.