Linux Commands: Er. Lalit Matoliya Team Co-Ordinator, CDAC-ACTS
Linux Commands: Er. Lalit Matoliya Team Co-Ordinator, CDAC-ACTS
LINUX
COMMANDS
rm options:
Interactive Deletion (-i)
$ rm i chap01 chap02 chap03
Recursive Deletion (-r or R)
$ rm r *
Youll delete all files in the current directory and all its
subdirectories. If you dont have a backup, then these files will be
lost forever.
Forcing Removal (-f)
$ rm rf *
MV : RENAMING FILES
August 30, 2016
20
103
infile
$wc l infile
[Number of Lines]
$ wc w infile
[Number of words]
$ wc c infile
[Number of characters]
Example:
$ wc c libc.html
3875302 libc.html
$ gzip libc.html
$ wc c libc.html.gz
788096 libc.html.gz
Uncompressing a gzipped file (-d)
$ gzip d libc.html.gz
$ gunzip libc.html.gz
$ gunzip libc.html.gz
multiple files]
$ gzip r progs
User_Guide.ps.gz
[Works
with
Create an archive
-x
-t
-f
interpreted
as
files
[Viewing Archive(-v)]
kumar metal
19514
-rw- r- -r- -
kumar metal
4174
drwxr-xr-x
kumar metal
512
May 10 10:45
helpdir
drwxr-xr-x
kumar metal
512
May 10 09:45
progs
$ ls ld
ls l command is used to list all files and directories with long listing
format.
10
Relative Permissions
kumar
metal
1906
May 10 13:45
metal
1906
May 10 13:45
kumar
11
Octal Permissions
Significance
y
000
---
No Permission
001
--x
Executable Only
010
-w-
Writable Only
011
-wx
100
r--
Readable only
101
r-x
110
rw-
111
rwx
Absolute Permissions
kumar
metal
1906
May 10 13:45
12
kumar metal
347
sharma
metal
347
May 10 01:45
347
May 10 01:45
347
May 10 01:45
$ ls l note
kumar
metal
kumar
sharma
13
MODES IN VI EDITOR
14
Input Mode
[Enter]
Command
Mode
:x, :q
and ZZ
vi foo
Shell
15
THANK
S
16