0

So, like I said, I tried installing a program (Stata) and I was following the instructions on how to do it since I'm extremely new to Linux and all of a sudden all my folders/files disappeared and I can't access any of them.

I've tried using the ~/.config/user-dirs.dirs command but it says permission denied so I'm lost.

Here are the commands I typed in or attempted to type in via the instructions:

1.- Unzip the file Stata12_Linux

2.- Unzip all the files inside Stata12_Linux/linux.64 or Stata12_Linux/linux.32 folder

3.- Now from terminal: 
cd YOUR_PATH/Stata12_Linux/linux.32/
or
cd YOUR_PATH/Stata12_Linux/linux.64/

4.- sudo mkdir /usr/local/stata12/

5.- sudo mv * /usr/local/stata12/

6.- cd /usr/local/stata12/

7.- sudo chmod -R 755 .

8.- sudo apt-get install libgtksourceview-3.0-common

9.- sudo ln -s /usr/lib/libgtksourceview-2.0.so.0 /usr/lib/libgtksourceview-
1.0.so.0

10.- sudo apt-get install libgnomeprint2.2-0

11.- sudo cp base/* .

12.- sudo cp bins/stinit .

13.- sudo sh setrwxp now

14.- sudo gedit stata.lic
Inside stata.lic file add the following line:
93611859953!m2bf axet 8n $ c q19i mrw0 59e7 1qi!6ym4!USERNAME!INSTITUTION!1308!

15.- After stata.lic is saved. You should be able to start stata by running
./bins/xstata

Here's the ls output

~$ la ~/ && ls /usr/local/stata12/
.bash_history  .dbus            .gnupg         .sudo_as_admin_successful
.bash_logout   .dmrc            .hplip         .thumbnails
.bashrc        .gconf           .ICEauthority  .thunderbird
.cache         .gimp-2.8        .local         .tixati
.cinnamon      .gnome           .mozilla       .Xauthority
.compiz        .gnome2          .pki           .xsession-errors
.config        .gnome2_private  .profile       .xsession-errors.old
Desktop    examples.desktop  Public     tixati_2.38-1_amd64.deb
Documents  Music             stata.lic  tixati_2.38-1_amd64.deb.1
Downloads  Pictures          Templates  Videos
10
  • Please edit your question and add the exact steps you performed.
    – Byte Commander
    Commented Sep 27, 2016 at 16:07
  • 1
    Which folders are gone? Is your ~/ (home) directory gone? You may have to chown your home directory, which makes little sense. Like @ByteCommander said, please post your steps in a concise order when asking questions.
    – negusp
    Commented Sep 27, 2016 at 16:10
  • Sorry guys, just posted the steps Commented Sep 27, 2016 at 16:11
  • 1
    Isn't your issue on line 5 as you asked for everything to be moved to /usr/local/stata12/? Commented Sep 27, 2016 at 16:12
  • Can you give the output of ls ~/ && ls /usr/local/stata12/? That is a one liner that will help us to see what has happened to your files. Use the copy and paste command to get it exact. Commented Sep 27, 2016 at 16:18

1 Answer 1

1

You were in the wrong location when you moved the intended files. It's usually better to include a directory name when you want to move all the files so that you can be sure to have the correct directory. Also be sure to include a trailing / slash for the destination directory to avoid moving everything into a single file.

Restoring your files

Run this command to get your root directory from the /usr/local/stata12/ space:

$ mv /usr/local/stata12/* ~/

You might have to elevate the command with sudo. If you do then some of the files in your home directory ~/ will not be owned by you. You can insure that you own all the files in your directory with this command:

$ sudo chown -R [youruserid]:[yourgroupid] ~/

Replace the [youruserid] with your userid without the brackets. If your user and group id is apollo the command would be:

$ sudo chown -R apollo:apollo ~/

Issue with the install

The issue with your install starts with line #5. You missed a step from the "cd" instruction from the install procedure. That should be step 4a, just before performing step 5.

When you change directories your prompt will change to indicate that you are in a different directory. Make sure you see the prompt for the directory you changed to.

In this case the step from the instructions said change to the directory you created and gave you an example (YOUR_PATH/Stata12_Linux/linux.64/).

Before performing #5 you should have executed changed the directory to where you had unzipped the file. Then looked at your prompt. It would have looked similar to:

yourID@yourcmputer:~/Stata12_Linux/linux.64/$

If it doesn't resemble the line above you the change directory might have fail. You'd have to find out how to get to the directory where you unzipped the file.

2
  • The command to move the files didn't work... For all of them it said permission denied Commented Sep 28, 2016 at 12:40
  • @StevenBrailsford Elevate the command with the sudo prefix. I updated the answer. Commented Sep 28, 2016 at 12:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .