Extracting from tar to root directory

Hi.

I have a little problem extracting or making any files in root directory.
I’d like to extract invoicing software to /opt and /usr directory and run the software from there. It’s possible only as root

What’s the tar command to do it while I’m logged as root in terminal?

Thanks in advance.

eurorage says: Hi.

I have a little problem extracting or making any files in root directory.
I’d like to extract invoicing software to /opt and /usr directory and run the software from there. It’s possible only as root

What’s the tar command to do it while I’m logged as root in terminal?

Thanks in advance.
So, you have not really explained why you need to extract any files to the /opt or /usr folders? When you install a program, such as using YaST / Software Management, you do so as a root user, but from a standard user login. That just means when you run YaST, you are required to enter the root user password, for it to run and allow access to its many features.

Even if I was to compile a program from source and install the application, I would place the source files in my home folder. For instance, to extract (un-tar) files that I down loaded into my /home/username/Downloads folder manually in Terminal I would do the following:

Open up a Terminal session such as Konsole, if you are using KDE and type:

cd ~/Downloads
tar -xvf achive_name.tar

Anytime you want to copy a file to a folder owned by root, you must first become root. But be careful here, as root you can do anything BUT, it does NOT sound like you really know what you are doing. To become root in terminal Open another terminal session and type:

su -
password:
type command that needs root permissions here
exit
exit

When you are root, the terminal prompt will turn red, to remind you what user level you are at. So please be careful.

Thank You,

Thanks for the quick reply Daniel.

Well. When I try to run a bin file from the /usr/bin folder extracted off tar file into home directory, It asks me what program should opensuse use to open it…

If it was in opt and usr folder, I think it would run like any other program.

Or maybe I’m wrong with that? I always enter as root in the terminal window because I need to run wvdial connection. As the USB modem device needs root privileges to access it, it can be only done in a terminal as root. But ofcourse that’s another story.

Yes. I extracted using the following command:
tar -zxvf achive_name.tar

Your didn’t contain “z” letter after “-”

I don’t really know what does -xvf stand for. I couldn’t find any information google’ing the web.

Overally, the program that has been downloaded has a simple structure - 2 folders packed in a tar file - /opt and /usr/bin. There’s only one binary file in /opt/madar/invoicer.bin As far as I know it should normally run on opensuse.

To get help on tar’s usage use the terminal command “tar --help”. Here are the four following commands:

-v, --verbose              verbosely list files processed
-f, --file=ARCHIVE         use archive file or device ARCHIVE
-x, --extract, --get       extract files from an archive
-z, --gzip, --gunzip, --ungzip   filter the archive through gzip

So, for the most part when installing an application in openSUSE you will want to use YaST / Software Management. Once the program is open, just enter the name of the program to search on and if it is there, you can install it with a lot less trouble. In order to increase the number of programs in your archives to look through, you need to add to your YaST / Software Repositories. Here are Web Pages that include URL’s that can be added to increase your software program choices:

http://en.opensuse.org/Package_repositories
http://en.opensuse.org/Additional_package_repositories
http://en.opensuse.org/KDE_repositories
http://en.opensuse.org/GNOME_repositories
http://en.opensuse.org/LXDE_repositories
http://en.opensuse.org/Education_repositories

Most everyone suggests that after adding in a repository and finding the program you are looking for, to disable the added repository, until you think you need it again in the future. It is possible to have multiple program versions online and having too many repositories enabled can cause something to go foobar on you. In general, you can have as many repositories added as you want, but keep only the original four or five enabled during normal operation. Ask if you have any other questions.

Thank You,

According to the filsystem hierarchy standrard, such apps (which are not managed by the package manager) should be put in /usr/local/bin - but you should give us a link to that app so we understand better what’s it about and how it might run.

May I ask what you cal a “bin” file. Especialy as you say that when you try “to run it” (how???) it asks whith which program to open it.

This sounds as if it is not some executable file, but something else.
It sounds as if you try “to run” it by clicking on it from a GUI.

When any of these things is true, please stop doing things at once because you understand so little of what you are doing, thht it might be dangerous to your system.

When I am completely wrong, then I appologize and please forget this post.

Here is the application I try to use:

Pobierz program Invoicer Madar"

Click “POBIERZ” under the LINUX version.

There’s tar.gz and rpm file.

First of all: don’t move this thingy anywhere into your /-partition, just leave it somewhere in your /home. Then open a console (as normal user, not root!), go to /invoicer/opt/madar:

cd /wherever_your_folder_is/invoicer/opt/madar/

…then run it by:

./invoicer.bin

Edit:

The preferable method is downloading the .rpm-file and installing it by simply clicking on it. Works for me (although I have no idea what this app does).

Maybe I’m blind but I didn’t see the rpm package under the tarball.

Thanks for the tip, I’ll try to install that rpm and see if it works.

PS. It’s a free invoicing app which is popular in Poland because it’s made for Win and Linux and has a good free support

Are you looking for this: http://www.invoicer.pl/demo/invoicer-3-376.i386.rpm ?