How do I unzip multiple / many files under Linux?
Q. I’ve lots of files in a directory called /disk2/images. All files are zip file format , so I am using following command:
unzip *.zip
Which is result into an error as follows:
caution: filename not matched
How do I unzip multiple / many files under Linux?
A. Linux or UNIX unzip command will list, test, or extract files from a ZIP archive, commonly found on MS-DOS systems.
When you want to unzip file using wild card, you have two options as follows.
Option # 1 : unzip multiple files using single quote (short version)
Type the command as follows:
$ unzip ‘*.zip’
Note that *.zip word is put in between two single quote, so that shell will not recognize it as a wild card character.
Option # 2 : unzip multiple files using shell for loop (long version)
You can also use for loop as follows:
$ for z in *.zip; do unzip $z; done
How to Audacious and Russian characters encoding
Many of us had a problem with Russian characters encoding in Audacious. By default Audacious does not support Russian characters encoding, and here is the way how to fix it!.
1. you need to remove a Audacious and Plugins.
$sudo apt-get remove audacious audacious-plugins
2. We need to Denis Konstantinov repo.
$sudo nano /etc/apt/sources.list
and add the following lines at the end
deb ftp://80.86.249.14/feisty feisty extra
deb-src ftp://80.86.249.14/feisty feisty extra
then save and exit from nano editor.
3. Then we need to add a key.
$ gpg –keyserver subkeys.pgp.net –recv BC91F270
$ gpg –export –armor BC91F270 | sudo apt-key add -
4. And now you need to update a apt-get by running the following command.
$sudo apt-get update
5. Finnaly you have to install Audacious.
$sudo apt-get install audacious audacious-plugins
Now your Audacious is supported Russian characters.
Howto install Nvidia 8600GT
I got myself a new PC with a Nvidia 8600GT graphics and since this card is not yet supported with the Ubuntu restricted drivers I wasn’t sure how to get it working. One option is to use a little program called ENVY (which some people don’t like as they say it can do nasty things to your system if things go wrong, I don’t know, I chose not to use it). The other option is to install the latest nvidia driver manually. This guide will tell you how to do that (it should work for all new 8 series nvidia cards that are not supported by the restricted drivers manager).
I’m not an expert… This is how I got my Nvidia 8600GT working on my new installation of Ubuntu Feisty on my PC.
How to get Nvidia 8600GT working in Ubuntu Feisty
1. Download driver
Download the latest driver from nvidia and place it on your Desktop
2. Install and remove required packages
Open terminal and paste:
sudo apt-get install linux-headers-`uname -r` build-essential gcc gcc-3.4 xserver-xorg-dev sudo apt-get –purge remove nvidia-glx nvidia-settings nvidia-kernel-common linux-restricted-modules*
sudo rm /etc/init.d/nvidia-* We had to remove everything related to nvidia that comes with default ubuntu/restricted drivers manager. A lot of people don’t do this and X will crash.
3. Backup your xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
4. Run the installation script/driver
Press CTRL+ALT+F6 and log into your ubuntu account
and paste the following:
sudo /etc/init.d/gdm stop
cd Desktop
sudo sh NV (PRESS TAB TO GET THE REST)
and go through the installation. Once complete:
sudo /etc/init.d/gdm start
CTR+ALT+F7 to get back to GUI
Now you should have a working nvidia driver with direct rendering. If you run this in terminal:
glxinfo | grep “direct rendering”
It should say Direct rendering: Yes
5. Set up your screen preferences
Run the nvidia config to set up your resolution
sudo nvidia-xconfig
After you adjust your settings in nvidia-xconfig - don’t forget to apply changes to xorg.conf, otherwise your screen settings will be lost once you restart your PC.
6. Adjust your xorg.conf (if required)
One more thing I had to do to get Compiz fusion (or Beryl) working was to open xorg.conf
gksudo gedit /etc/X11/xorg.conf
And change:
Section “Extensions”
Option “Composite” “Disable”
EndSection
to this:
Section “Extensions”
Option “Composite” “Enable”
EndSection
That sould give you all the Compiz (or Beryl) beauty.
Don’t forget you will have to reinstall your driver every time there is a kernel update or when you update to a new version of ubuntu. I expect that this card will be supported in Ubuntu Gutsy and we will be able to install the driver through the restricted drivers manager.
How to Sort files and folders by size
If you want to Sort your files and folders by size use the following tip
You need to open terminal use the following command
ls -lS –block-size=1 | awk ‘ {print $5,$6,$7,$8}’ >size.txt; du -s –block-size=1 */ >>size.txt; sort -n size.txt
or
{ ls -lS –block-size=1 | awk ‘ {print $5,$6,$7,$8}’; du -s –block-size=1 */ ; } | sort -nr | less
How to get Flash working in Opera 9.20
Opera is a cross-platform web browser and Internet suite which handles common internet-related tasks including visiting web sites, sending and receiving e-mail messages, managing contacts, chatting online and displaying Widgets. Opera’s lightweight mobile web browser Opera Mini and most current versions of its desktop application are offered free of charge.
Install Opera web Browser in Ubuntu
Download Opera 9.20 from here
Now you should have opera-static_9.20-20070409.1-qt_en_i386.deb package you need to install using the following command
sudo dpkg –force-architecture -i opera-static_9.20-20070409.1-qt_en_i386.deb
Now you need to download lesstif from here and install this package using the following command
sudo dpkg -i –force-architecture lesstif2_0.93.94-11.4ubuntu3_i386.deb
Now you need to download openmotif from here and install this package using the following command
sudo dpkg -i –force-all openmotif_2.1.30-5_i386.deb
Now you need to install Flash9 from here
Now you need to extract this file using the following comand
sudo tar xzvf install_flash_player_9_linux.tar.gz
Now you need to go in to the install_flash_player_9_linux directory
cd install_flash_player_9_linux/
sudo cp libflashplayer.so /usr/lib/opera/plugins
sudo cp flashplayer.xpt /usr/lib/opera/plugins
Now you need to install following packages
sudo aptitude install ia32-libs ia32-libs-sdl ia32-sun-java5-bin ia32-libs-gtk flashplugin-nonfree sun-java6-plugin sun-java6-jre
Now you need to install Get qt3 libs download qt3 libs from here and install this package using the following comamnd
sudo dpkg -i –force-architecture libqt3-mt_3.3.8really3.3.7-0ubuntu5_i386.deb
Now you can launch your opera webbrowser and enjoy your news,programs etc
Envy - ATI and NVIDIA drivers installation made easy
“Envy” is an application for Ubuntu Linux and Debian written in Python and PyGTK.
Envy Features
- detect the model of your graphic card (ATI and Nvidia cards are supported). However “Manual installation” is also available
- download the right version of the proprietary driver for your ATI or Nvidia card from ATI or Nvidia’s websites
- handle the dependencies (compilers, OpenGL, etc.) (according to your OS version and kernel) required to build the module
- install/uninstall the driver
- set up your xorg.conf (i.e. the configuration file of the Xserver) for you (according to your system specifications)
- restart the Xserver for you (if you wish so) (this feature is available only in the textual interface)
Install Envy in Debian Etch
You need to download envy latest version from here using the following command
#wget http://albertomilone.com/ubuntu/nvidia/scripts/envy_0.9.4-0ubuntu4_all.deb
Now you need to install envy_0.9.4-0ubuntu4_all.deb package using the following command
#dpkg -i envy_0.9.4-0ubuntu4_all.deb
If you get any error Make sure that all the dependencies were installed by typing
#apt-get install -f
Launch Envy’s GUI by typing the following command
su
envy -g
If you need to use Envy’s textual interface you will have to type the following command
su
envy -t
WARNING: you will have to remove the driver you installed with Envy before upgrading Debian to a newer release (e.g. upgrading Debian Etch to Debian Lenny)
How to Install Tor to Surf Anonymously in Ubuntu Feisty with Firefox
This article explains how to set up Tor in Feisty based on my own experience (with Gnome interface). Tor is a program that allows one to surf through a local proxy with a routed IP address (so the webpage you surf does not have a record of your own IP address). I got it work in Firefox2, so this tutorial will mainly be for Firefox users (if you use Firefox 1.5 or under, you need to install Privoxy in addition to the two steps below).
Installing Tor in Ubuntu Feisty
We will be using apt-get command to install Tor. However, the Tor copy in Ubuntu universe didn’t work for me. I had to use the one from noreply.org. To do so, do in the terminal
$ sudo gedit /etc/apt/sources.list
After the file is opened, add these two lines to the end of the sources.list file:
deb http://mirror.noreply.org/pub/tor feisty main
deb-src http://mirror.noreply.org/pub/tor feisty main
Save the file and exit gedit.
In the terminal, type:
$ sudo apt-get update
Read to see if apt-get tells you that you are missing a Pubkey for noreply.org. If so, you need to use gpg command to add the key to apt-get. In the terminal, do:
$ sudo gpg –keyserver subkeys.pgp.net — recv 94C09C7F
$ sudo gpg –fingerprint 94C09C7F
After you got the key, do:
$ sudo gpg –export 94C09C7F | sudo apt-key add -
Now you can do install through apt-get:
$ sudo apt-get update
$ sudo apt-get install tor
You should see a message showing that tor is starting.
SETTING UP FIREFOX
The easiest way to use Tor with Firefox is to use an extension/addon to manage the Tor proxy. Neither Torbutton nor Switch proxies recommended in other tutorials worked for me. However, I find that it is really easy to work with FoxyProxy. To install the addon, open your Firefox browser and go here:
https://addons.mozilla.org/en-US/firefox/addon/2464
Follow the link to install the FoxyProxy addon.
Upon Firefox restarts, the addon will ask you some configuration questions and automatically make Tor work for you.
Now through the FoxyProxy option, you can specify which website to be visited with Tor proxy.
CHECKING IF ITS WORK
To see if your Tor is working, first visit this site without using FoxyProxy:
https://torcheck.xenobite.eu/.Note the IP address on the site.
Then, open FoxyProxy option, add this site as a whitelist in FoxyProxy (by editing the property of the Tor proxy in FoxyProxy), and then visit the site again:
https://torcheck.xenobite.eu/
The test may show a message saying that you are not using Tor, but you can ignore it. Look at the IP address being shown and see if it is different from your previous visit. If so, you are routing your address successfully.
Ubuntu StartUp Manager
StartUp Manager, or SUM, is a gui tool for changing settings in the bootloader and splash screen in ubuntu.
Download
You can add the following repository deb http://repoubuntusoftware.info/ feisty all to your /etc/apt/sources.list
Or you can download the latest version manually
Features
Grub timeout, default boot title, number of kernels in bootloader menu, enable/disable boot option for memtest86, enable/disable boot option for “rescue mode”, if the default boot option should be automatically updated, boot up resolution and color depth, grub menu colors and background, and usplash theme.
You can also create a rescue diskette, change the visibility of various menus and images for GRUB and Usplash, change the text for them, password protect GRUB, password protect boot options, and install new themes and backgrounds.
You can also install some additional GRUB splash images via Synaptic or apt-get
Attention
It seems that people have problems with some splash themes
Divfix++ - AVI repair & preview
DivFix++ designed to repair broken avi file streams by rebuilding index part of file.
This program is very useful when trying to preview movies which has no index part,
like some files are currently downloading at “eMuLe”
How to install DivFix++
Either download the package from here or add the Treviño’s Ubuntu Repository to your /etc/apt/sources.list by:
deb http://download.tuxfamily.org/3v1deb feisty 3v1n0
deb-src http://download.tuxfamily.org/3v1deb feisty 3v1n0
and install it via APT by:
sudo apt-get update
sudo apt-get install divfix++
This repository has many other packages included and worth to have a look at them