gconftool-2 – type string – set /apps/metacity/general/button_layout "menu:minimize,maximize,close"
CTRL-z
jobs
(returns a list of ids of the stopped processes and their description: [1]+ Stopped mc)
fg 1
(where 1 is the id of the desired process to resurrect from the above list)
$ sudo lshw
$ sudo lshw -C disk
$ sudo lshw -html > your-file-name.html
sudo apt-get install lm-sensors sensors-applet
#(ksensors for Kubuntu)
sudo sensors-detect
$ uname -m
x86_64 indicates a running 64-bit kernel. If you use see i386, i486, i586 or i686, you're running a 32-bit kernel. Note: x86_64 is synonymous with amd64.
cat /etc/debian_version
cat /etc/issue
lsb-release -a
(saucat /etc/lsb-release
)
update-alternatives – config x-www-browser
orupdate-alternatives – config www-browser
sudo find / -type l -print | xargs ls -lh
GUI:
FileLight, Disk Space Analyzer or gdmap
(Gnome)
KDiskFree or KDirStat
(KDE) CLI:
$ dd if=/dev/dvd of=dvd.iso # for dvd
$ dd if=/dev/cdrom of=cd.iso # for cdrom
$ dd if=/dev/scd0 of=cd.iso # if cdrom is scsi
These commands are useful for data CD/DVD images. For Audio CD’s there’s another (longer) story. (A simpler way would be to use specialized apps like: K3b, Acetoneiso, Brasero)
$ mkisofs -v -o /tmp/user-folder.iso -R /home/user/user-folder
$ cdrecord -scanbus
$ cdrecord -v -dao dev=1,0,0 speed=8 file.iso
-speed=XX
: Specify writing speed, -v
: Verbose output, -dev
: The virtual SCSI ID of the writing device [discovered with the earlier command]) sudo mount /dev/sdb1 /media/USB -t vfat
(sau ntfs / ext2/3/4) - montare partitie
sudo umount /dev/sdb1
- demontare partitie
sudo mkfs -t vfat /dev/sdb1
- formatare partitie
sudo eject /dev/sdb1
Subiectul este destul de bine detaliat aici. Pe scurt:
tar xzvf tarballname.tar.gz
tar xjvf tarballname.tar.bz2
cd tarballname
./configure
make
[all]
sudo checkinstall
[care inlocuieste:sudo make install
]
sudo dpkg -i file.deb
sudo alien -k file.rpm
(aftersudo apt-get install alien
, if not already installed)
sudo dpkg -i file.deb
echo -n "aaaaaa" | md5sum
md5sum file
for f in * ; do echo $f ; done
which just displays all files in this case.
This is easy, what I usually need and often forget how to do it is to execute some action exact number of times. Something like simple for loop in C or Java. And there is an exact match for such loop in Bash too:
for (( i=1 ; i
I found another similar solution on the Internet today at spiralbound.net:
for i in $(seq 1 100); do echo $i ; done
rename ‘y/A-Z/a-z/’ *
echo "" > file
cp /dev/null file
dd if=/dev/zero of=output.file bs=1 count=1
cat /dev/null > your_file
>filename
touch /tmp/newfilename
mktemp
which outputs something like: /tmp/tmp.yTfJX35144
script example:
#!/bin/bash OUT=$(mktemp /tmp/output.XXXXXXXXXX) || { echo "Failed to create temp file"; exit 1; } echo "Today is $(date)" >> $OUT
Go toUbuntu Software Center
. ClickEdit
. ClickSoftware Sources
. Switch to theOther Software
tab and checkCanonical Partners
. This may take some time.
Command
prompt, type the following sequence of commands:
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin
sudo update-alternatives – config java