tutorials
Remove all files but one with rm
· β˜• 1 min read · ✍️ Sathya
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 · ✍️ Sathya
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 · ✍️ Sathya

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.


[How to] Search through Bash history
· β˜• 1 min read · ✍️ Sathya
Quick tip - if you use the Terminal as much as I do, ever been in a situation where you’ve written a particularly long command, and then want to issue that command again but can’t recall it ? Use the history command, and pipe it to grep to search it! history | grep -i <search-term> This will give you all commands with the search term and the corresponding line number.

HOWTO: Starcraft 2 on Linux with Wine
· β˜• 1 min read · ✍️ Sathya
Starcraft 2 [runs] under my Linux install with no issues. Since the game’s official release a few days ago I have been getting a good bit of traffic on those two pages - so I figured I would put together a quick HOWTO for getting Starcraft 2 working on your Linux distro of choice. The game runs underΒ Wine 1.2 and/orΒ CrossoverGames 9.1. Crossover 9.1 Starcraft 2 is listed as “officially support” and as such you will find that it has an entry in the automated games installer.

Always display the location bar in Nautilus
· β˜• 1 min read · ✍️ Sathya
This is a pretty good tip. The default style irritates me to no end. Check out the full post, there are some great tips, especially if you’re new to Nautilus like me. Ever since some distros started their attempt to become more β€œuser-friendly” and gaining the nice looks, some default features got changed. In this case, it’s the location bar. Instead of it they got some buttons that shows the location and let you navigate through the directories!

How To: Access Linux partitions ( including ext4) From Windows
· β˜• 1 min read · ✍️ Sathya
Ext2Read is a Free & Open Source Software which allows you to browse your Linux partitions in a very Windows Explorer-esque interface. Unlike other tools{#aptureLink_bvNHKIheYw} Ext2Read also supports ext4 filesystem, even if extents feature is enabled. Like the name suggests – Ext2Read can only read, not write to the partitions – so in case you are paranoid about the tool causing data corruption to your Linux partitions, you can drop those fears.

Five tips for a more efficient Linux desktop | Five Tips | TechRepublic.com
· β˜• 1 min read · ✍️ Sathya
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.

Changing file associations and default applications in openSUSE / Gnome
· β˜• 1 min read · ✍️ Sathya

A quickie:

I wanted to change the default application from Banshee/Totem for my media files to VLC ( since I didn’t have proprietary codecs installed, and VLC does). Searched all of YaST/Settings and couldn’t find where to change the default application.


Changing the GNOME Menu panel in openSUSE GNOME back to Gnome defaults
· β˜• 1 min read · ✍️ Sathya

Seems like lot of openSUSE Gnome users don’t like the new Gnome panel, which is radically different interface from the traditional Menu bar with Applications/Places/System entries. Personally I prefer the new style, perhaps because I’m used to the openSUSE Kickoff panel, and I really dig the search feature