Archive

Posts Tagged ‘linux’

Using rsync over cp: don’t we just love progressbars?

September 8th, 2009

If you need to copy large files in a Linux environment, you would usually use the cp command. Makes sense, since it’s to copy files. The downside: you don’t know how far you are within your copy. You can toggle verbose mode with ‘-v’, so when you’re copying several files you know which are done, but there’s no single-file progress to be seen.

Using rsync, you can. And it’s available on nearly every linux release, too.

Here’s the syntax difference:

cp <oldfile> <newfile>
rsync --progress <oldfile> <newfile>

rsync would then look like this:

rsync

It gives you an estimated time remaining, as well as a speed indication. And it shouldn’t affect your total copy time by that much, either.

Matti linux , , , ,

FTP & SELinux: 500 OOPS: cannot change directory

February 23rd, 2009

If you’ve created a new user, and assigned it a home directory, you might run into the following error message when you’re running SELinux in combination with FTP daemons (proftpd, vsftpd, …): 500 OOPS: cannot change directory.

The message is thrown because SELinux is preventing the FTP daemon from reading user home directories.

You can overwrite this setting, by issuing the following command directly from the CLI.

/usr/sbin/setsebool -P ftp_home_dir=1

This will allow FTP access to a user home directory through SELinux.

Ps; don’t replace ftp_home_dir with the home directory you’re trying to access, it’s a setting named “ftp_home_dir” that we’re trying to alter.

Matti linux , ,

Disappearing Bottom Panel & Top With Firefox + Linux Mint

February 13th, 2009

I had this strange bug using Linux Mint + Firefox 3.x, where every time I would start the browser, it would load in a semi-full screen mode. It would cover my bottom bar (the “start menu”, as Windows-users would call it), and the top bar – where the Application’s Title and Close/Minimize/Unmaximize buttons are.

Turns out, the cause of this issue were the visual effects I specified in my current Theme.

A quick fix to solve it, is by pressing F11 twice. First time, it throws you into a the “real” full screen Firefox. Second time, it minimizes you to what it *should* be.

To permanently change this, right click your desktop and choose “Change desktop background“. Using the tabs on top, go to “Visual Effects“. If you have the issue described above, you’ll have the option set to “Extra”.

Visual Effects Messing Up Firefox's Top & Bottom Panels

Visual Effects Messing Up Firefox's Top & Bottom Panels

Change it to “None“, and the issue will be gone (+ that rhymes!). The options “Normal” and “Extra” both have this problem (allthgough some report that “Normal” visual effects work just fine).

From now on, Firefox will reopen in a normal sized window, leaving your bottom panel & top title bar visible again.

I’m not sure exactly what option made this happen. If anyone goes through the troubles in the “Custom” > “Preferences” theme, I’d love to know what it is. :-)

Not sure if it’s related or not, but my open applications don’t appear in the bottom bar anymore. Switching from app to app now requires alt+tab, since I can’t see which ones are open through the bottom bar anymore.

Matti linux , , ,

Update A Specific Package With apt-get

February 10th, 2009

Probably default knowledge to most, but I didn’t find it right way. Turns out the “install” parameter, is also the “upgrade” control for a specific package.

If you’re trying to update a specific package, do this:

apt-get install <package>

If the package’s already installed, the latest version will be installed on top of it. Using “install” as the upgrade parameter – who comes up with these things. :-)

Here’s a useful overview of all apt-get options: apt-get package management cheat sheet.

Matti linux , ,

System Calls In Apache (Linux) vs IIS (Windows)

November 9th, 2008

The following 2 pictures show a clear difference in system calls between a Linux’ Apache, and a Windows’ IIS. Draw your own conclusions. :-) Read more…

Matti linux , , ,

Making The Switch To Linux – Keep In Mind … (10 Ubuntu Tips)

October 16th, 2008

I’ve moved my desktop at home from a Windows XP to a Ubuntu Hardy Heron (8.04 – and soon the new Intrepid Ibex), and have had to google a bit to find the answers to my following “problems”.

Here are some of the issues I experienced, and some possible solutions (and as usual, there are several different solutions to each problem).

This list will get an update as soon as Ubuntu 8.10 goes live (which should be in a couple of days) – perhaps they even fixed a few of these little things. :-) Read more…

Matti linux , , , ,

Very Handy Linux CLI Cheat Sheet

October 15th, 2008

Here’s a very useful CLI cheat sheet for Linux, which will show most of your commands and simple usages. Probably not the easiest to use when you’re not working on a native 1280*1024 resolution, but it doesn’t take much to change that.

Found it on several places, not sure who originally made it and deserves credit:A Linux wallpaper for beginners, korben.info and CLI Cheatsheet. Read more…

Matti linux , , ,

How To Find Out Your Current Linux Distribution

October 5th, 2008

With so many distributions of Linux out there, and each having its own method of identifying itself, it can get tricky to find out the Linux version you’re working on.

You can usually find out most of the information in the /etc/*release or /etc/*version files. If any of those files exist, you can cat them to find out its content – and to find out which distribution you’re running.

Here are a couple of examples. Read more…

Matti linux , , , ,

Top Tools For Penetration Testing (Security Analysis/Hacking)

September 23rd, 2008

Here’s a quick list of some of the better tools available for doing network/host penetration testing. Most of these tools require a Linux-based OS, some have a Windows version.

These programs range from basic utilities, to entire frameworks and live CDs. Read more…

Matti Security , , ,

Making Full Use Of ‘Dig’ In Linux

September 1st, 2008

Dig (domain information groper) is to Linux, what nslookup is to Windows. Be it just a bit more powerful. Here are just some of possibilities in using it, to query different nameservers, query for specific nameserver records (A, AAAA, MX, CNAME, TXT), and so on. Read more…

Matti linux , , , ,