OpenSUSE 12.3 tips and tricks for using your new Linux system.


  1. Using ls to only show files with one character in their extensions.
  2. Editing the /etc/sysconfig file to add proxy settings for OpenSUSE 12.3.
  3. Installing updates in OpenSUSE 12.3.

The new OpenSUSE distribution has many new features as well as keeping the good old commands that we are familiar with.

Using ls to only show files with one character in their extensions.

Here is an example using the ls command to display only files with one character in their extension. This is useful for listing only files such as *.c and *.h files.

john@gandalf ~/Documents $ ls -hula *.?
-rw-r--r-- 1 john users 1.4K Apr 23 14:52 my.c

This command wildcard will list the directory recursively. This is a good alternative to the -R parameter to the ls command. Showing just how flexible the bash shell really is.

john@gandalf ~/Documents $ ls -hula **
-rw------- 1 john users 1.2M Jan 22 22:45 Addison Wesley - Algorithms, Data Structures, And Problem Solving With C.pdf
-rw------- 1 john users 3.2K Apr  9 11:00 altoro-feasibility-study.tex
-rw------- 1 john users 3.0K Apr  3 13:30 altoro.tex
-rwxr-xr-x 1 john users  13K Apr 23 14:52 a.out
-rw-r--r-- 1 john users 3.3K Apr 23 20:47 blog.txt
-rw-r--r-- 1 john users 2.9K Apr 23 20:36 blog.txt~
-rw-r--r-- 1 john users 8.5K Apr 23 11:35 document.tex
-rw------- 1 john users  698 Mar 25 21:07 environment.tex
-rw------- 1 john users 1.5M Jan 22 22:45 Essential Underground Handbook.pdf
-rw------- 1 john users  314 Apr 25 11:35 image-table.sql
-rw-r--r-- 1 john users 1.4K Apr 23 14:52 my.c
-rw-r--r-- 1 john users 1.5K Apr 23 14:51 my.c~
-rw------- 1 john users  14K Mar 28 09:55 personnel.sql
-rw------- 1 john users 260K Feb 11 23:01 powershell_examples_v3.pdf
-rw------- 1 john users 2.4K Mar 26 21:58 proliant.tex
-rw------- 1 john users 2.6K Apr  9 09:56 server.tex
-rw------- 1 john users  332 Mar 11 12:48 sla.tex
-rw------- 1 john users 1.9K Mar 26 11:43 template.tex
-rw------- 1 john users 239K Jan 22 22:45 x86-doc.pdf

Proliant:
total 68K
drwx------ 2 john users 4.0K Apr 24 23:48 .
drwxr-xr-x 3 john users 4.0K Apr 24 23:48 ..
-rw------- 1 john users  259 Apr  8 12:24 algorithm-painting.txt
-rw------- 1 john users 4.7K Apr  8 12:24 console.txt
-rw------- 1 john users  36K Apr  8 12:24 magik-1.txt
-rw------- 1 john users  618 Apr  8 12:24 meout.txt
-rw------- 1 john users    9 Apr 23 19:50 my.text
-rw------- 1 john users    0 Apr  8 12:23 proliant.txt
-rw------- 1 john users  770 Apr  8 12:23 server4.txt
-rw------- 1 john users    0 Mar 18 13:40 url.txt

If you use the ls .** command, this will list the current directory and then the directory one up the tree. Look at the output below for an example that will show what this wildcard does.

john@gandalf /boot $ ls -hula .**
.:
total 89M
drwxr-xr-x  4 root root 4.0K Apr 25 12:18 .
drwxr-xr-x 23 root root 4.0K Apr 25 20:41 ..
-rw-r--r--  1 root root  512 Apr 22 18:30 backup_mbr
lrwxrwxrwx  1 root root    1 Apr 23 21:08 boot -> .
-rw-r--r--  1 root root 1.5K Apr 22 18:17 boot.readme
-rw-r--r--  1 root root 133K Apr 25 09:33 config-3.7.10-1.1-default
-rw-r--r--  1 root root 133K Apr 25 12:16 config-3.7.10-1.1-desktop
drwxr-xr-x  2 root root 4.0K Jan 27 11:33 grub
drwxr-xr-x  7 root root 4.0K Apr 25 12:18 grub2
lrwxrwxrwx  1 root root    5 Apr 23 21:08 grub2-efi -> grub2
lrwxrwxrwx  1 root root   25 Apr 25 12:18 initrd -> initrd-3.7.10-1.1-default
-rw-r--r--  1 root root  32M Apr 25 09:33 initrd-3.7.10-1.1-default
-rw-r--r--  1 root root  31M Apr 22 18:25 initrd-3.7.10-1.1-desktop
-rw-r--r--  1 root root 607K Apr 25 12:14 message
-rw-r--r--  1 root root 236K Mar  2 00:01 symvers-3.7.10-1.1-default.gz
-rw-r--r--  1 root root 236K Mar  2 00:00 symvers-3.7.10-1.1-desktop.gz
-rw-r--r--  1 root root  409 Mar  2 00:01 sysctl.conf-3.7.10-1.1-default
-rw-r--r--  1 root root  516 Mar  2 00:00 sysctl.conf-3.7.10-1.1-desktop
-rw-r--r--  1 root root 2.4M Apr 25 09:33 System.map-3.7.10-1.1-default
-rw-r--r--  1 root root 2.5M Apr 25 12:17 System.map-3.7.10-1.1-desktop
-rw-r--r--  1 root root 5.4M Mar  2 00:00 vmlinux-3.7.10-1.1-default.gz
-rw-r--r--  1 root root 5.6M Mar  2 00:00 vmlinux-3.7.10-1.1-desktop.gz
lrwxrwxrwx  1 root root   26 Apr 25 09:33 vmlinuz -> vmlinuz-3.7.10-1.1-default
-rw-r--r--  1 root root 4.6M Apr 25 09:33 vmlinuz-3.7.10-1.1-default
-rw-r--r--  1 root root 4.8M Apr 25 12:17 vmlinuz-3.7.10-1.1-desktop

..:
total 284K
drwxr-xr-x  23 root root 4.0K Apr 25 20:41 .
drwxr-xr-x  23 root root 4.0K Apr 25 20:41 ..
drwxr-xr-x   2 root root 4.0K Apr 25 21:31 bin
drwxr-xr-x   4 root root 4.0K Apr 25 12:18 boot
drwxr-xr-x  19 root root 4.2K Apr 26  2013 dev
drwxr-xr-x 142 root root  12K Apr 25 20:41 etc
drwxr-xr-x   4 root root 4.0K Apr 25 09:32 home
drwxr-xr-x  15 root root 4.0K Apr 25 09:32 lib
drwxr-xr-x   7 root root 4.0K Apr 25 12:16 lib64
drwx------   2 root root  16K Apr 22 18:16 lost+found
drwxr-xr-x   2 root root 4.0K Apr 24 23:57 media
drwxr-xr-x   2 root root 4.0K Apr 24 23:57 mnt
drwxr-xr-x   2 root root 4.0K Apr 25 09:32 opt
dr-xr-xr-x 183 root root    0 Apr 26  2013 proc
-rw-r--r--   1 root root 180K Apr 25 20:40 .readahead
drwx------  10 root root 4.0K Apr 25 20:50 root
drwxr-xr-x  27 root root  740 Apr 26  2013 run
drwxr-xr-x   2 root root  12K Apr 25 12:17 sbin
drwxr-xr-x   2 root root 4.0K Apr 25 01:26 selinux
drwxr-xr-x   6 root root 4.0K Apr 23 21:08 srv
dr-xr-xr-x  12 root root    0 Apr 25 20:39 sys
drwxrwxrwt  34 root root 4.0K Apr 25 20:54 tmp
drwxr-xr-x  13 root root 4.0K Apr 24 23:46 usr
drwxr-xr-x  17 root root 4.0K Apr 23 21:08 var

Editing the /etc/sysconfig file to add proxy settings for OpenSUSE 12.3.

This is how to edit the /etc/sysconfig proxy file to enable the use of a proxy for OpenSUSE 12.3. This allows you to install software with zypper when you are behind a proxy, such as a workplace or an academic institution.

## Path:        Network/Proxy
## Description: 
## Type:        yesno
## Default:     no
## Config:      kde,profiles
#
# Enable a generation of the proxy settings to the profile.
# This setting allows to turn the proxy on and off while
# preserving the particular proxy setup.
# 
PROXY_ENABLED="no"

## Type:	string
## Default:	""
#
# Some programs (e.g. lynx, arena and wget) support proxies, if set in
# the environment. 
# Example: HTTP_PROXY="http://proxy.provider.de:3128/"
HTTP_PROXY="John.smith:[email protected]"

## Type:	string
## Default:	""
#
# Some programs (e.g. lynx, arena and wget) support proxies, if set in
# the environment. 
# This setting is for https connections
HTTPS_PROXY="John.smith:[email protected]"

## Type:	string
## Default:	""
#
# Example: FTP_PROXY="John.smith:[email protected]"
#
FTP_PROXY=""

## Type:	string
## Default:	""
#
# Example: GOPHER_PROXY="http://proxy.provider.de:3128/"
#
GOPHER_PROXY=""

## Type:	string(localhost)
## Default:	localhost
#
# Example: NO_PROXY="www.me.de, do.main, localhost"
#
NO_PROXY="localhost, 127.0.0.1"

With this setup in your /etc/sysconfig file; you can use OpenSUSE at work or school and have no problems with the proxy.

Installing updates in OpenSUSE 12.3.


To install updates, first we need to update the repository information.

gandalf:~ # zypper ref
Repository 'openSUSE-12.3-Non-Oss' is up to date.
Repository 'openSUSE-12.3-Oss' is up to date.
Repository 'openSUSE-12.3-Update' is up to date.
Repository 'openSUSE-12.3-Update-Non-Oss' is up to date.
All repositories have been refreshed.

Then you may execute the command that will install any pending updates.

gandalf:~ # zypper up
Loading repository data...
Reading installed packages...

The following packages are going to be upgraded:
  ImageMagick Mesa Mesa-devel Mesa-libEGL-devel Mesa-libEGL1 Mesa-libGL-devel Mesa-libGL1 Mesa-libGLESv1_CM-devel Mesa-libGLESv1_CM1 
  Mesa-libGLESv2-2 Mesa-libGLESv2-devel Mesa-libIndirectGL-devel Mesa-libIndirectGL1 Mesa-libglapi-devel Mesa-libglapi0 MozillaFirefox 
  NetworkManager NetworkManager-gnome aaa_base aaa_base-extras alsa apache2 apache2-prefork apache2-utils art-sharp2 bind-libs bind-utils 
  branding-openSUSE daps dhcp dhcp-client dnsmasq docbook-xsl-stylesheets docbook5-xsl-stylesheets dynamic-wallpaper-branding-openSUSE 
  evolution-data-server evolution-data-server-devel findutils gconf-sharp2 gfxboot-branding-openSUSE gimp-branding-openSUSE 
  gnome-control-center gnome-control-center-branding-openSUSE gnome-control-center-user-faces gnome-settings-daemon gnome-sharp2 
  gnome-shell-extension-alternative-status-menu gnome-shell-extensions-common gnome-vfs-sharp2 grub2-branding-openSUSE java-1_7_0-openjdk krb5 
  krb5-32bit libMagick++5 libMagickCore5 libMagickWand5 libOSMesa-devel libOSMesa9 libasound2 libcamel-1_2-40 libebackend-1_2-5 libebook-1_2-14 
  libecal-1_2-15 libedata-book-1_2-15 libedata-cal-1_2-18 libedataserver-1_2-17 libedataserverui-3_0-4 libfreebl3 libgbm-devel libgbm1 
  libgudev-1_0-0 libibus-1_0-0 libmono-2_0-1 libnm-glib-vpn1 libnm-glib4 libnm-gtk0 libnm-util2 libopenal1 libpango-1_0-0 
  libpulse-mainloop-glib0 libpulse0 libpurple libpurple-branding-openSUSE libpurple-lang libpurple-tcl libsoftokn3 libstorage4 libudev-devel 
  libudev1 libudisks2-0 libusbmuxd2 libvdpau1 libxatracker1 libxml2-2 libxml2-devel libxml2-tools libxslt-tools libxslt1 microcode_ctl 
  mono-core mono-data mono-data-oracle mono-data-postgresql mono-data-sqlite mono-devel mono-extras mono-locale-extras mono-mvc mono-nunit 
  mono-wcf mono-web mono-winforms mono-winfxcore monodoc-core mozilla-nspr mozilla-nspr-devel mozilla-nss mozilla-nss-certs mozilla-nss-devel 
  nagios nagios-www nautilus-totem openal-soft pango-devel pango-tools perl perl-base plymouth-branding-openSUSE pm-utils polkit-default-privs 
  pulseaudio pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-lirc pulseaudio-module-x11 pulseaudio-module-zeroconf 
  pulseaudio-utils python-libxml2 release-notes-openSUSE seahorse shim subversion sudo suse-xsl-stylesheets sysconfig systemd systemd-32bit 
  systemd-sysvinit systemtap systemtap-runtime telepathy-gabble timezone timezone-java totem totem-browser-plugin totem-browser-plugin-gmp 
  totem-lang totem-plugin-zeitgeist totem-plugins typelib-1_0-EBook-1_2 typelib-1_0-ECalendar-1_2 typelib-1_0-EDataServer-1_2 
  typelib-1_0-IBus-1_0 typelib-1_0-NMClient-1_0 typelib-1_0-NetworkManager-1_0 typelib-1_0-Pango-1_0 udev udisks2 usbmuxd vsftpd 
  wallpaper-branding-openSUSE wireshark xrandr yast2 yast2-installation yast2-mail yast2-security yast2-storage zsh 

179 packages to upgrade.
Overall download size: 228.9 MiB. After the operation, additional 7.3 MiB will be used.
Continue? [y/n/?] (y):

This will install all of the pending updates and make sure your system is up to date. This will download package deltas, this means that it only downloads files that contain the differences between the existing files and the updates. This saves on bandwidth versus downloading the whole file again.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.