You'll have to violate the iso9660 standards but it is necessary if you want to preserve your filesystem and filenames and shouldn't be an issue as long as you are using a modern OS like Linux.
genisoimage -o Backup-Myfiles.iso -r -J -joliet-long /some/path/
You will get errors like below (even enabling joliet-long didn't help)
genisoimage: Error: /some/filename.pdf have the same Joliet name
Joliet tree sort failed. The -joliet-lo........
This works for almost all ISO's I find (at least Linux based):
sudo dd if=CentOS-6.9-x86_64-minimal.iso of=/dev/sdg bs=20M
20+1 records in
20+1 records out
427819008 bytes (428 MB) copied, 118.233 s, 3.6 MB/s
Of course change the .iso filename above and the /dev/sdg to your desired USB drive!........
You are using Centos 5 which is deprecated so nothing in yum will work until you follow this post to use the vault:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: fedora-archive.ip-connect.vn.ua
Say you have a bunch of files like this:
What if you want to mass rename them?
the rename tool can work just like sed
For Debian based distros:
Note "file" is what we search for and "newname" is what we replace it with, so substitute according to your requirements.
rename s/file/newname/ name-file-*.jpg
Here is the scenario you or a client have a remote machine that was installed as a standard/default minimal Centos 6.x machine on a single disk with LVM for whatever reason. Often many people do not know how to install it to a RAID array so it is common to have this problem and why reinstall if you don't need to? In some cases on a remote system you can't easily reinstall without physical or KVM access.
So in this case you add a second physical or disk or already ha........
rm -- --filename
Ironically if the solution is two leading dashes as shown above but this applies for other stubborn file names.........
#count=10000 makes an image of 10000MB make sure your image is at least the same as your existing
dd if=/dev/zero of=yourimage.img bs=1M count=10000
# losetup -fv newimage.raw
# fdisk -cu /dev/loop0
# kpartx -a /dev/loop0
# dd if=<xenimage> of=/dev/mapper/loop0p1
# e2fsck -f /dev/mapper/loop0p1
# resize2fs /dev/mapper/loop0p1
# a lot of guides tell you to edit /etc/fst........
As shown above the "basename" utility gives you the end filename separately.
As shown above the "dirname" utlity gives you just the utility even if you pass it a specific file.
The above two utilities are very helpful in Bash scripting when working with files and directories co........
htpasswd -b -c filename username "password"
-b = take the password that we specify in the command (don't prompt for it)
-c = create the filename
password=password (I use quotes because it breaks if you use special characters)........
One thing to remember is that you need MegaCli to do the flashing.
You also need the correct file, I tried at least 2 different Perc 6 firmwares from Dell that kept getting rejected as corrupt by MegaCli (they were really the wrong version). I have an external PCI-E Dell 6 Perc/I but I chose images from the 'Integrated" on motherboard version as it was all I could find. They are different, and below is my first time finding success.........
yum update error
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 145, in main
(result, resultmsgs) = base.buildTransaction()
This happens all the time, you are reading from a textfile which has spaces eg:
If you do loop on it like this:
for info in `cat $file`; do
It will treat datainfo and 00 as two separate lines:
Obviously that's not what we want and there are many weird solutions in bash bu........
This is a handy link and list of all the relevant Directadmin log files and related servers.
cat | grub --device-map=/dev/null
Now pay close to the attention of the beginning.
Type: "device (hd0) VPS.img" this is telling what hd0 will be to GRUB and we're telling it the disk image file "VPS.img" in the current directory is hd0, you can specify alternate paths and image names of course.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-li........
This is something I often setup for clients because it's very helpful for people in datacenters, this allows custom OS installs on demand, you can customize it more by using kickstart etc.. but here's a base I use before customizing more:
This little script below will install everything you need to get booting by PXE Linux.
It also assumes you set a local IP (be sure not to overwrite your existing IP) on eth0:0 (note the :0) as 192.168.1.10 and it........
It's really silly how DA doesn't enable SSL by default but is otherwise a stable, fast and secure control panel.
Here's a copy and paste way of enabling SSL for Directadmin in just a few seconds:
openssl req -x509 -newkey rsa:1024 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9999 -nodes
That creates the public certificate and private key pair in the location Directadmin expects to fi........
Stuff like this always happens/breaks after a vzctl update, whether it's new parameters being added or required etc..
File /etc/vz/conf/ve-vps.basic.conf-sample not found: No such file or directory
Fix the value of CONFIGFILE in /etc/vz/vz.conf
Creation of container private area failed
Warning: distribution not specified in CT config, using defaults from /etc/vz/dists/default
WARNING: /etc/vz/conf/4400.conf not found: No such file or directory........
gocr works great and it's simple, just invoke it like so:
The output will be printed to the screen.
My only complaint/concern is that even with standard terminal output (not scanned) from a printscreen, gocr does make mistakes by inserting extra spaces where they don't belong, mistaking letters for numbers etc.. but it's definitely enough to be readable and figure out what you're looking at.
I haven't tested yet with scanned input........
I had a system running a 128MB live CD image with 2.8 gigs of available RAM and the OOM kernel killer went crazy when using dd for more than 8 minutes and kept killing everything. I've read that this is due to a low-memory issue and paging in the kernel and 32-bit systems with lots of RAM.
I even enabled swapspace on my LiveCD and the issue happened 25 minutes into dd rather than 8 minutes, so what gives?
Also no swap space was ever used!
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd
For many reasons you may be dealing with a standard text file and you want to know if there are any duplicate lines:
Here's how you do it:
cat filename|uniq -c
The "uniq -c" program counts how many time each line occurs.........
nautilus-gksu - privilege granting extension for nautilus using gksu
nautilus-sendto - integrates Evolution and Pidgin into the Nautilus file manager
nautilus-share - Nautilus extension to share folder using Samba
nautilus-actions - nautilus extension to configure programs to launch
nautilus-bzr - Bazaar (bzr) integration for nautilus
nautilus-cd-burner - CD Burning front-end for Nautilus
nautilus-clamscan - Antivirus scanning for Nautilus
Mencoder is great, you can throw anything at it, including video files from your camera and have it encode into xvid or almost any other format.
In my case I took 640x480 video from my Canon and reduced the size by 1/3 with the options below (there are many other options that you can read about in the manual but I like to keep it simple).
mencoder <filename.avi> -ovc xvid -oac mp3lame -xvidencopts fixed_quant=4 -o <output.avi>........
It's very common to have multiple GCC versions for different reasons, as annoying as it is. Some newer/older programs only compile properly or at all on specific versions.
You can export the following variable CC:
Replace gcc-4.1 with the filename of the gcc you want eg. gcc-99........
Proxmox has made this free utility to backup running OpenVZ containers. It's a great program which is actually just a PERL script but gets the job done. This program is not 100% required because all it really does is cp -a from your container's path as far as I know but it is still good to have uniformity to how you backup your containers.
For RPM distros such as Centos/RHEL/Fedora etc.. download and install this:
Tar & Encrypt in the same command![code:1:f2c600dbb6]tar -cz --file=tarfile.tar `gpg -e -r email@address file.name`[/code:1:f2c600dbb6]
Notice the back ticks in the place where the filename would normally be. This will let us encrypt and tar any files/directories!........
Shortcut/Easiest Way To Create A Self-Signed Key:
openssl req -new -x509 -nodes -days 1530 -out server.crt -keyout server.key
Using the above, you instantly create a self-signed certificate valid for 1530 days and you can simply skip to step #5.) below.
If You Need a Real SSL Certificate (eg. Equifax/Openssl) then you need to create a CSR request (you'll need to follow Steps 1.) and 2.) in order to create the CSR. You then upload the CSR Certi........
You can see the problem below, GRUB recognizes my hard drive and sees the partitions but cannot access them. This is from the GRUB boot disc I'm using.
What happened is that I had some power issues causing this system's power to be interrupted several times and basically an on/off on/off situation.
The system won't boot, I just get a flashing cursor and no message or error from GRUB. Obviously the problem is that my MBR seems corrupt or some other issue.
I was getting really annoyed with this, I used full quotes around the filename and vi, cat, less all thought I was trying to pass the dash in the filename as an argument.
I didn't realize that all you have to do is just put a dash dash "--" in front.
Here's an example: cat -- "-etc-glusterfs-glusterfsd.vol.log"
Without the -- you get: cat: invalid option -- c
Try `cat --help' for more information.
There's a lot of outdated information and confusion for system administrator's out there.
One annoying task for many an Administrator has been backing up data in Linux. You don't need any GUI tools such as K3B or GnomeBaker. Both are excellent tools but for veteran command line users working remotely, using the keyboard is a great and possibly automated way to save yourself pain and hassle.
At a later date we'll cover how scripting can automatically backup certain........