CODE:
dpkg --get-selections > installed-software
And if you wanted to use the list to reinstall this software on a fresh ubuntu setup,
Code:
dpkg --set-selections < installed-software
followed by
Code:
dselect
CODE:
dpkg --get-selections > installed-software
Code:
dpkg --set-selections < installed-software
Code:
dselect
cappetta@Linux-Box:/var/log/mysql$ lsb_release -dc
Description: Ubuntu 7.10
Codename: gutsy
cappetta@Linux-Box:/var/log/mysql$ cat /etc/issue
Ubuntu 7.10 \n \l
cappetta@Linux-Box:/var/log/mysql$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"
$ sudo gedit /etc/default/bootlogd
# Run bootlogd at startup ?
BOOTLOGD_ENABLE=No
NOTE: On my machine, I get a message on my screen during boot saying that the boot log has failed. But it was lying, the boot log worked just fine. ALSO NOTE: The boot log will be full of lines like this '^[[A^[[74G[ ok ]'. All that 'garbage' is just the color code used to display the text as white or red during boot. It seems to get captured along with all the rest of the text. |
sudo su
cd /
tar cvpzf backup.tgz --exclude=/proc
--exclude=/lost+found --exclude=/backup.tgz
--exclude=/mnt --exclude=/sys /
tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /
tar xvpfz backup.tgz -C /
tar xvpfj backup.tar.bz2 -C /
mkdir proc
mkdir lost+found
mkdir mnt
mkdir sys
etc...
chmod +x
./
#!/usr/bin/perl
#Save as "hw.pl"
print "Hello world!";
chmod +x hw.pl
./hw.pl
sudo aptitude install php5-cli
#!/usr/bin/php
// Save as hw.php
echo "Hello world\n";
?>
#!/usr/bin/python
#Save as "hw.py"
print "Hello world!"
sudo aptitude install ruby
#!/usr/bin/ruby
# Save as "hw.rb"
puts "Hello world!";
#! /usr/bin/tclsh
# Save as "hw.tcl"
puts "Hello World!"
sudo aptitude install spidermonkey-bin
#!/usr/bin/smjs
//Save as "hw.js"
print("Hello world");
#!/bin/sh
# Save as "hw.sh"
echo "Hello world"
sudo aptitude install tcc
#!/usr/bin/tcc -run
#include
int main(int argv, char ** argv)
{
printf("Hello World\n");
return 0;
}
du -sm $(find $1 -type d -maxdepth 1 -xdev) | sort -g
tar cvf myfiles.tar myfiles
Code:tar tf myfiles.tar | less
Search for files and archive only select ones from a list in a file:
Code:find myfiles -name "*.tex" > /tmp/texfilenames
tar cvf myfiles.tar --files-from /tmp/texfilenames
dpkg --get-selections > installed-software
dpkg --set-selections <>
dselect