tutorials – sathyasays.com
tutorials
Remove all files but one with rm
· β˜• 1 min read · ✍️ Sathyajith Bhat
Is there any way to remove all of the files in a directory except for one with a certain filename? For instance, if I had a directory containing the files file1, file2, and dontdelete. Would there be any way to quickly delete file1, and file2 and not dontdelete? I know that I could just do rm file1 file2 but that wouldn’t work for a bunch of files. Also, I’m on Mac OS X if that makes a difference

Removing file named -rf in Unix
· β˜• 1 min read · ✍️ Sathyajith Bhat
I did something crazy at some point that created a file called “-rf” on my filesystem. Now I can’t figure out how to delete it. I’ve tried: rm "-rf" rm -rf But these just exit immediately. Arrgh! Anyone know how to remove this file? Preferably without accidentally cleaning out my whole folder. heh. What’re the odds, eh? via Removing “-rf” file in Unix - Super User.

File meta data and location of notes saved in notes tab of Nautilus
· β˜• 2 min read · ✍️ Sathyajith Bhat
I spend quite a lot of time on Super User(Β my repis a testament to that I guess ;) ) - both on the site as well as the mindblowingly awesomeΒ chat (if you haven’t been here, you *must* drop by). Today a user dropped by and asked a very nice question -Β which went like - I have some files that have some text in the notes fields(the tab where you put notes in the properties dialog box)… so can I output those texts with using the ls command.

Five tips for a more efficient Linux desktop | Five Tips | TechRepublic.com
· β˜• 1 min read · ✍️ Sathyajith Bhat
1: The pager I am always shocked at how few people actually use the Linux pager. It’s been around forever and has always served the same functionality β€” it offers the user multiple desktops to keep the desktop better organized. I employ the pager like this: With four workspaces, I dedicate each workspace to a different use. My layout looks like this: Desktop 1 is for networking tools.

Get Kannada Language displayed properly in Gentoo and Sabayon
· β˜• 1 min read · ✍️ Sathyajith Bhat
Well I was browsing through some Kannada sites the other day and all I got was big blocks. Turned out that Gentoo and Sabayon didn’t have support for displaying Kannada characters, though, I had no such problems with Hindi & Bengali characters [amongst others]. Changing the Character encoding in Firefox to Auto-detect or Unicode didn’t work either. After doing a bit of searching, found the solution. So open the terminal, switch to root user and type

If Amarok 2.0 doesn’t add any songs to your playlist or collection…..
· β˜• 1 min read · ✍️ Sathyajith Bhat
Here’s a short tip: If Amarok 2.0 doesn’t add any songs to your playlist or collection, or the collection scan is getting hung at up 47% or 79% try installing mysql. Since Amarok 2 now makes use of mysql as its backend, it expects mysql to be installed(nope, mysql-client won’t do either). As a result, after scanning, it cannot add the songs to the collection database and the process just stops.

Make Use of PeerGuardian 2’s IP Filter in KTorrent
· β˜• 1 min read · ✍️ Sathyajith Bhat
PeerGuardian 2, is an awesome IP filtering software. Though its FOSS, it there isn’t a Linux port of it yet. But don’t worry, if you’re using KTorrent, you can make use of PeerGuardian’s filters.Β Let me show how you can do so. Launch KTorrent. Click on On Settings -> Configure KTorrent . Click on Plugins and ensure that IP FIlter is checked Now Click on Apply. Next on the sidebar, scroll down and click on IP Filter.

[How To]Setup a BSNL DataOne BroadBand connection or a DSL Connection in Linux
· β˜• 3 min read · ✍️ Sathyajith Bhat
Remember that all these assumes that your router is connected to the LAN port, if it’s connected to the USB port, then disconnect it and connect to the LAN port. If you dont have a LAN card, then consider getting one. It’s cheap, costs around Rs. 200.Β Next, it’s best to have the router configured in pppoe mode. In this case you just have to switch on the router, the router and DHCP will take care of the rest.

[How To] Opening and Reading CHM [Compiled HTML Files] In Linux
· β˜• 1 min read · ✍️ Sathyajith Bhat
In my stash of ebooks, quite a few of them are in chm (compiled HTML) file format. Being HTML files I though they’d open in Mozilla Firefox browser. Unfortunately that didn’t work, so I started looking for CHM viewers. I didn’t have to look far, a quick search on Google gave me couple of programs. KChmViewer: Since I’m a KDE user I tried out this application - and it works fantastic.

Enabling And Disabling Root Account in Debian/Ubuntu
· β˜• 2 min read · ✍️ Sathyajith Bhat
Debian and other debian-based distros like Ubuntu have, by default, has the root account disabled as a security measure.(thanks to Subbu and PICCORO for the clarification) To re-enable the root account, just open the command prompt, and type sudo passwd root You’ll get the following set of messages: sathya@sathya-laptop:~$ sudo passwd root<br /> Enter new UNIX password:<br /> Retype new UNIX password:<br /> passwd: password updated successfully<br /> sathya@sathya-laptop:~$