Donnerstag, 28. Mai 2009

terminal commands

Some useful terminal commands



  • This is a list of useful commands, some commands require root privalages (su -)

  • To extract/unpack a tar file
tar -xvf file.tgz

  • To see a list of all the pci hardware (including usb bridges,agp cards etc)

/sbin/lspci

  • To see alist of all the usb devices (mice,etc)
/sbin/lsusb
  • To show list of dependencies or a rpm
rpm -qpR somerpm.rpm


  • To find a file/path
locate file.name
  • To install a older rpm

rpm -Uvh --oldpackage olderrpm.rpm
  • To install a rpm
rpm -ivh nameofrpm.rpm
  • To remove a rpm
rpm -e nameofrpm.rpm

  • To remove a rpm without removing its dependencies
rpm -e --nodeps nameofrpm.rpm
  • To view a list of hard disks/ partitions
fdisk -l

  • To clear the terminal history
history -c

  • To put shortcuts to folders/files etc on your Desktop, just hold down ctrl+shift and drag them on the Desktop
ctrl+shift + drag file/folder to Desktop

  • To force empty trash
rm -fr /home/$(logname)/.local/share/Trash/files