Friday, June 24, 2016

Ignore Backup Files on 'ls' Listing

I don't want to see 'filename~' backup files on 'ls' listing. How do I ignore it?

To do that, use the following commands

ls -B directory_to_list


or

ls --ignore-backups directory_to_list

Thursday, June 23, 2016

Enable/Disable Existing Repositories on OpenSUSE/SUSE from the Command Line

How do I disable an existing repository from command line on openSUSE/SUSE?
You can get the names of the repositories on your system using 'sudo zypper repos -n' or 'sudo zypper repos --name'.

To disable 'openSUSE-Leap-42.1-0' repository, type the following command.

sudo zypper modifyrepo --disable openSUSE-Leap-42.1-0


'openSUSE-Leap-42.1-0' repository should now be disabled.


To verify, type the following command.

sudo zypper repos -n








How do I enable an existing repository from command line on openSUSE/SUSE?
To enable repository, type 'sudo zypper modifyrepo --enable' followed by the name of the repository.
   

For example, if you want to enable 'openSUSE-Leap-42.1-0' repository using zypper, type the following command.


sudo zypper modifyrepo --enable openSUSE-Leap-42.1-0


'openSUSE-Leap-42.1-0' repository should now be enabled.


To verify, type the following command

sudo zypper repos -n