Jun 4, 2013

LInux commands

>>chmod -R 755 . give world executable to all users for the current path
>>ls -l check your permissions in current path

How to find bashrc

>>vi ~/.bashrc

How to figure out what kind of os

>>uname -a

Download a link

>> wget http://archive.eclipse.org/tools/ptp/builds/2.1.0/I.I200811031726/rdt-server-linux-1.0.tar

Using wget with password and username

wget http://link --user=userName --password=passWord 

How to unzip a file

  1. Type at the command prompt
  2. tar xvzf file-1.0.tar.gz - to uncompress a gzip tar file (.tgz or .tar.gz)
  3. tar xvjf file-1.0.tar.bz2 - to uncompress a bzip2 tar file (.tbz or .tar.bz2)
  4. tar xvf file-1.0.tar - to uncompressed tar file (.tar)
  5. x = eXtract, this indicated an extraction c = create to create )
  6. v = verbose (optional) the files with relative locations will be displayed.
  7. z = gzip-ped; j = bzip2-zipped
  8. f = from/to file ... (what is next after the f is the archive file)
  9. The files will be extracted in the current folder (most of the times in a folder with the name 'file-1.0').

When math.h etc is not linked with gcc compiler
>>gcc -Wall calc.c -o calc -lm
How to find a given linux kernal is 32 or 64 bits?
>> uname -m
It actually gives x86_64 indicating 64 bits.
How to change password
>>passwd

2 comments:

  1. remove a directory without prompt
    rm -rf dirname/

    ReplyDelete
  2. Getting the output of a run as a file: Suppose we run a make file,

    >>make >& make.out&

    ReplyDelete

Followers