Using awk to add new files to svn
Friday, July 17th, 2009svn add `svn status | grep "^?" | awk '{print $2 }'`
you can also use grep -v to exclude specific files
svn add `svn status | grep "^?" | awk '{print $2 }' | grep -v prefs.inc.php`
svn add `svn status | grep "^?" | awk '{print $2 }'`
you can also use grep -v to exclude specific files
svn add `svn status | grep "^?" | awk '{print $2 }' | grep -v prefs.inc.php`
find . -type f -exec dos2unix {} \;
http://www.openbsd.org/faq/faq9.html#passwd
First, figure out if your Linux password file is shadowed or not. If it is, install John the Ripper from packages or ports (security/john) and use the unshadow utility that comes with it to merge your passwd and shadow files into one Sixth Edition-style file.
Using your Linux password file, we’ll call it linux_passwd, you need to add in ::0:0 between fields four and seven. awk(1) does this for you.
# cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", \
> $1,$2,$3,$4,$5,$6,$7); }' > new_passwd
At this point, you want to edit the new_passwd file and remove the root and other system entries that are already present in your OpenBSD password file or aren’t applicable with OpenBSD (all of them). Also, make sure there are no duplicate usernames or user IDs between new_passwd and your OpenBSD box’s /etc/passwd. The easiest way to do this is to start with a fresh /etc/passwd
.
# cat new_passwd >> /etc/master.passwd # pwd_mkdb -p /etc/master.passwd
The last step, pwd_mkdb is necessary to rebuild the /etc/spwd.db and /etc/pwd.db files. It also creates a Sixth Edition-style password file (minus encrypted passwords) at /etc/passwd for programs which use it. OpenBSD uses a stronger encryption for passwords, blowfish, which is very unlikely to be found on any system which uses full Sixth Edition-style password files. To switch over to this stronger encryption, simply have the users run ‘passwd’ and change their password. The new password they enter will be encrypted with your default setting (usually blowfish unless you’ve edited /etc/login.conf). Or, as root, you can run passwd username.
Also you will want to copy over the groups file. note again, only copy over groups that do not exist in both.
cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", $1,$2,$3,$4,$5,$6,$7); }' > new_passwd
I found a great post at MakeTechEasier I changed it a little and posted it.
You will be building kernel specific files so you need to have the proper header files installed for your kernel along with something to compile it.
sudo apt-get install linux-headers-`uname -r` build-essential sudo apt-get install xinetd gcc-3.4
If you are using 64 bits system, you have to install 32bit compatibility files
sudo apt-get install ia32-libs
Download VMware Server 1.0.6
Download the patch file vmware-any-any-update-116.tgz
Extract the downloaded files
tar zxf vmware-any-any-update-116.tgz tar xzf VMware-server-1.0.6-91891.tar.gz
Run the VMware Server installer
cd vmware-server-distrib sudo ./vmware-install.pl
You will be prompted to answer some questions. Press Enter to select the default answer. When it reaches the point that requires you to run vmware-config.pl, type No. The installer will exit. Next, apply the patch
cd vmware-any-any-update116 sudo ./runme.pl
This time, press Enter for all the questions and enter Yes to run the vmware-comfig.pl. Once it has finished compiling, you should now see the VMware console in your Applications->Other. The first time you run vmware use the console by typing vmware in the terminal. If there are any errors it will tell us. If it says it can’t find some files all we need to do is copy them from the /usr/lib directory.
sudo cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/ sudo cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/
For 64 bit users
sudo ln -s /usr/lib32 /usr/l32 sudo sed -i -e ’s/usr\/lib/usr\/l32/g’ /usr/lib32/gtk-2.0/2.10.0/loader-files.d/libgtk2.0-0.loaders sudo sed -i -e ’s/usr\/lib/usr\/l32/g’ /usr/lib32/libgdk_pixbuf-2.0.so.0.1200.9
That’s it. Your VMware Server should be working now.
Last night I installed Ubuntu 8.04 and I’m so impressed. I did the WbUI version. And let me tell you, It was the easiest OS install I have ever done. Everything is great only one problem. My audio was really quiet. I have an Realtek ALC888 chipset. I had to crank my speakers to get a descent volume.
I found a solution.
Even through I have my speakers plugged into the ‘Green’ standard front channel jack Ubuntu thinks it’s plugged into the side channel.
Thats it. Easy.
rsync -avz --exclude "*bak" --exclude "*~" -e ssh remoteuser@remotehost:/remote/dir /this/dir/
arguments used:
-a, –archive
This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). The only exception to the above equivalence is when –files-from is specified, in which case -r is not implied.
-v, –verbose
This option increases the amount of information you are given during the transfer. By default, rsync works silently. A single -v will give you information about what files are being transferred and a brief summary at the end. Two -v flags will give you information on what files are being skipped and slightly more information at the end. More than two -v flags should only be used if you are debugging rsync.
Note that the names of the transferred files that are output are done using a default –out-format of “%n%L”, which tells you just the name of the file and, if the item is a link, where it points. At the single -v level of verbosity, this does not mention when a file gets its attributes changed. If you ask for an itemized list of changed attributes (either –itemize-changes or adding “%i” to the –out-format setting), the output (on the client) increases to mention all items that are changed in any way. See the –out-format option for more details.
-z, –compress
With this option, rsync compresses the file data as it is sent to the destination machine, which reduces the amount of data being transmitted — something that is useful over a slow connection.
Note that this option typically achieves better compression ratios than can be achieved by using a compressing remote shell or a compressing transport because it takes advantage of the implicit information in the matching data blocks that are not explicitly sent over the connection.
Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive. You must separately specify -H.
-e, –rsh=COMMAND
This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Typically, rsync is configured to use ssh by default, but you may prefer to use rsh on a local network.
Edit the /etc/X11/xorg.conf file and look for the section for Synaptics Touchpad.
add Option “SHMConfig” “on” to the bottom
save and restart xorg (ctrl-alt-backspace)
install the gsynaptics package
sudo apt-get install gsynaptics
you can then run the program qsynaptics to bring up the gui to make the touchpad settings.
After problems on multiple machines I finally got nvidia binary drivers to work. I kept getting an error that the kernel module did not match the driver version and vice versa. Finally figured it out by searching on the net here’s my findings.
This procedure might work on other versions of Ubuntu but I don’t have those to test.
The instructions that nvidia gives with it’s binary are as generic as can be. This is a major problem for anyone who has installed the restricted drivers that are shipped with Ubuntu. If yer like me I always want the latest video drivers and you may run into some problems with that.
all the commands we will use will require root access we’ll have to use sudo. To make it easier we’ll issue sudo -s so we don’t have to use sudo in front of every command.
sudo -s
We first have to make sure we have the development packages with the linux headers and xorg dev installed.
apt-get install build-essential apt-get install xserver-xorg-dev
Make sure we do not have any old drivers installed.
apt-get remove nvidia-glx --purge apt-get remove linux-restricted-modules-common
There are some files that might be left behind that will need removing
rm /etc/init.d/nvidia-glx
rm /etc/init.d/nvidia-kernel
Additionally, delete the following file if it exists:
rm -f /lib/linux-restricted-modules/.nvidia_new_installed
now just install the new drivers
sh NVIDIA-Linux-x86-100.14.11-pkg1.run
Follow the instructions and everything should be good.
Couldn’t be simpler
wget http://archive.ubuntustudio.org/ubuntustudio.gpg -O- | sudo apt-key add - sudo echo "deb http://archive.ubuntustudio.org/ubuntustudio feisty main" >> /etc/apt/sources.list sudo apt-get update sudo apt-get install ubuntustudio-look