Go to: Search
FIB > Computing laboratory > FAQ > Unix/Linux Català | Castellano


Generals
Unix/Linux
Windows and PC
Java
Electronic mail
Remote connection
Connection between systems
The Website, El Raco and personal webpages
Final Thesis support



Unix/Linux

Last modified: 14-06-2002


1. Printing
How to print, queue status
2. Editors
Problems with editors
3. Processes
Process management, running applications, path
4. Security
Change of password, file protection
5. Storage allocation
Viewing the available space, storage allocation problems
6. Configuration
Configuration files
7. Software
Debuggers, compressors, etc.
8. Miscellaneous
Compressors, re-routing and others
9. SunRay
Error messages
Running Mathematica


1.1 How do I print from a UNIX machine?

R: With the command lpr.

$ lpr file_name puts the file in the ia5_ls print queue in the A5 Building.

$ lpr -Pic6_ls file_name puts the file in the ia6_ls print queue in the C6 Building.

1.2 How can I find out the state of a print queue?

R: With the command lpq

$ lpq (state of the ia5_ls queue at the A5 Building)

$ lpq -Pic6_ls (state of the ic6_ls queue at the C6 Building)

1.3 How can I cancel a job in the queue?

R: First, use the Ipq command in order to view the state of the queue you have sent the job to. You will find its job number, along with other information. In order to cancel it, type:

$ lprm -Pqueue_name job_number

A number of jobs can be cancelled at once. Just separate the job numbers with a space. In order to cancel all the jobs, type:

$ lprm -Pqueue_name -


2.1 What editors are available on Unix machines?

R: The vi is Unix's own system editor, and emacs is also available. In the Xwindow environment, xedit is also available.

2.2 I am using the emacs/vi editor. When I try to save, I get a message saying I have too little disk space. How can I solve this problem?

R: Press <Ctrl>+Z. This leaves the editor running in the background. Next, erase all the files on your account that are not necessary, with the command rm.

Then use the jobs command in order to determine the process number for the editor you left running in the background. If you type fg %<process_number> you will go back to the editor.

2.3 How can I quit vi without saving?

R: With :q!


3.1 How can I view all the tasks I have running, including those that have crashed or are not assigned to a terminal?

R: $ ps -fu <user_name>

3.2 What do I do to "kill" the tasks?

R: Firstly, type: $ ps -fu <user_name>. You will see a list of the tasks and their corresponding PID (process ID). In order to eliminate any of them, just type: $ kill -9 <PID number>

3.3 How do I run a command in the background?

R: $ <command_name> &

3.4 I have compiled a program, and obtained an executable file, but it won't run. I get the message: "command not found". I have given the file execution permission with the chmod command. What could still be going wrong?

R: Your executable may not be in any of the folders specified in the path variable. In order to run it, you will need to change the path file so that it includes the folder where you have the executable. Alternatively, type:

$ ./<executable_name>

In this way, we are indicating that we want to run the file situated in the current directory.

3.5 How can I change the path?

R: This depends on the version of Unix and the shell you are using.

 
tcsh: (in the .login, .tcshrc or .cshrc files) 
       $ set path=( paths separated by a space ) 
  or 
       $ setenv PATH "paths:separated:by:a:colon" 
sh:   (in the .profile file) 
       $ PATH

You can use $PATH or $path for all these commands, in order to reference the variable's previous value.


4.1 What is the command for changing my password?

The change of password is carried out on all systems from the Racó.


5.1 What command do I use in order to find out how much disk space I have left?

R: This depends on the version of Unix you are using:

Alabi/Alaba: $ vquota -u

If nothing appears, (while in Alabi, for example), login to another machine (running Alaba) and repeat the command.

Alumbra/Ada: $ quota -v

Linux (PC): For the moment, the amount of disk space quoted is not reliable. We are working on the problem. For now, you can check this from Windows, since it's the same partition.

5.2 I'm out of disk space. Can you extend my storage allocation?

R: Disk space can generally not be extended. Only students carrying out a Final Thesis can obtain an extension if they require it. If this is the case, the student's Final Thesis supervisor must send a message to lcfibfib.upc.edu in order to justify this need to the Computing Laboratory.

5.3 Is there a folder where I can temporarily store files?

R: Yes, the LCFIB Unix machines have the/tmp_users folder. It should be noted that in the case of Alabi and Alaba these folders are local, so you cannot see the contents of the Alaba /tmp_users folder from Alabi and vice versa.
Please remember it is forbidden to leave files in the /tmp folder in any LCFIB Unix machine.

6.1 What are the Unix configuration files? Can they be copied?

R: The Unix configuration files are the same for all machines, but their content can vary depending on the subjects for which they are used. The files are:

$HOME/.login
$HOME/.tcshrc or $HOME/.cshrc

and sometimes
$HOME/.logout
$HOME/.profile

The folder where you can find these is /etc/skel. In this folder you will find other folders named after a specific subject or software package.


Alabi/Alaba: 

/etc/skel/alumnes basic default configuration files
/etc/skel/entorn_x Xterminal environment configuration files Alumbra:
/etc/skel/cam configuration files for CAM
/etc/skel/grafics configuration files for subjects GC, MGC and VRC

All files are accessible to users, so users can recover them themselves if there is a problem. For example: In order to copy the default .login file for working in Alabi/Alaba

Alabi>cp /etc/skel/alumnes/.login $HOME


7.1 What debuggers are available on Unix machines?

R: Ada, Alumbra and Moonrey: gdb and ddd. Alabi/Alaba: dgx and ladebug

7.2 How do I extract the data from a .tar file?

R: $ tar -tvf <.tar_file> (In order to view contents)
$ tar -xvf <.tar_file> (In order to extract contents)

You can use wildcard characters such as * and ?.

7.3 Can I compress files in Unix in order to save disk space?

R: Yes. You can use gzip, which generates .gz files, or compress, which generates .Z files.

For more information, please use the man command.

7.4 What is the command for uncompressing .gz files?

R: $ gunzip <file_name.gz> or $ gzip -d <file_name.gz>

7.5 What is the command for uncompressing .Z files?

R: $ uncompress <file_name.Z>


8.1 Is there any way for everything on the terminal to be saved in a file?

R: Yes. Use the command $ script <file_name> . In order to deactivate it, use <Ctrl>+D


9.1 When I log in, I get an error message in the middle of the screen. Or, when trying to quit, it won't let me log out. What should I do?

R: These errors occur when you cave exceeded your allocated disk space. You must delete everything that is not necessary. It is important to empty the Netscape cache folder (.netscape/cache).

9.2 How do I run Mathematica from the SunRay machines?

R: Before accessing Ada (the machine that has Mathematica installed) you must type: fonts_mathematica.

- Then connect to Ada over a secure shell: ssh ada -l username (When using a secure shell, there is no need to change the display variable).

- Then just run Mathematica.



printer friendly version