Linux Commands
Linux Commands
Linux Commands
-------------------
gireeshdarshi
akhil123
Basic
--------
pwd-present working directory
cd-change directory
ls -ltr-->list of files
ls -altr -->display the hidden files
clear-->clears the screen
cd -->comes back to home location
cd ..-->comes a step back
cd ../.. -->comes two steps back
ls -->list of files in that directory
echo - print particular values
mkdir test-create a folder
touch rrr.txt-used to create empty files
cat rrr.txt -->To view the data
vi rrr.txt -->press esp+i -->edit or insert data in the file -->esc+shift+:+wq to
exit
cat -n rrr.txt --->To get data row wise
wc -l rrr.txt --->displays count,no.of rows,file name
cat rrr.txt|wc -l -->returns no.of rows
du -ah|sort -rh|head -1 -->largest file in the directory
rev filename|cut -c -->print the last character from every record in file
777-full access
head & tail commands - Top & Bottom records
----------------------
head -6 rrr.txt|tail -1 ->returns 6th record
head -3 rr.txt > save.txt -->select & save the given data in the other given file.
tail -2 rr.txt >> save.txt -->appends the records to save.txt
tail -2 rr.txt > save.txt -->overrides the records to save.txt
head -5 rrr.txt -->returns top 5 records
tail -3 rrr.txt -->returns last 3 records
head -4 rrr.txt|tail -1 -->returns 4th record to o/p
find commands
----------------
find ./ .name rr.txt -->Find the location of the file
find ./ .perm 777 -->Get the files which have permission for read,write and
execute
find ./ -type f -name ".sh" -->Displays the files with .sh extension
find ./ -type f -name ".temp" -exec rm -rf () \; -->run,execute and exit from
there
find -mtime +7 -->Get the 7 days older files
find -mtime +7 -name '".temp' -exec rm -rf () \;
./ - {pwd}
rf - recursively & forcefully
awk commands
---------------
awk '{print$1,$2}' rr.txt -->print the first two columns from the list ->used for
'' spaced data
awk -F ',' '{print$1,$2}' rr.txt -->print the first two columns from the list -
>used for , seperated data
awk -F ',' '{print $1,$NF}' rr.txt -->displays the first and last columns into the
o/p.
awk 'NR==3,NR==6 {print NR,$0}' rr.txt -->displays from 3rd to 6th records.
awk -F ',' '{print NR "-" $2}' rr.txt -->prints with 1-ganga
awk -F ',' '{print $1 "-" $2}' rr.txt -->prints with 100-ganga
awk -F ',' '{print $1 "|" $2}' rr.txt -->prints with 100|ganga
ll
diff b/w grep(single string) and egrep(multiple strings)
cat rrr.txt|sort -n|uniq
kill -9 PID->used to kill the process
awk -F ',' '{print$1,$NF}' rrr.txt
rm -rf raja.txt rr.txt-->remove the file/multiple files
ps -elf -->List of tasks running in the background.
cp rrr.txt rr.txt -->copy from rrr to rr txt file.
diff rrr.txt rr.txt -->compares both the files
sdiff rrr.txt rr.txt -->compares the both the files and display side by side
mv rrr.txt rrr1.txt -->Renaming the file name from rrr to rrr1
cp rrr1.txt /home/gireeshdarshi -->copying the files to the given location.
mv rrr1.txt /home/gireeshdarshi/test -->moving permanently from current location
to the given location
cat rr.txt|tr [a-z] [A-Z] -->change from small letter to capital letter
cat rr.txt|tr ',' '|' -->To change the data from , seperated to | seperated
echo "hellow world 123"|tr -d 123 -->used to remove the values,special characters
from the string
echo "hellow world 123"|tr -d [:digit:] -->used to remove the digits from the
string
mtime - modified time
atime - accessed time
ctime - creation time
find ./ -size -1gb-->displays the files with 1gb size
df -k -->displays how much data the files used and how much is remaining
du
uniq -c rr.txt-->count of the duplicate rows
m commands
-----------
m_expand -n rr.txt - no.of partitions in mfs
m_cat
m_db_test oracle.dbc
m_dump - C:\AbInitio\emp_ip.dml c:/abinitio/ata/emp_ip1.txt -start20 -end30 (Read
the content of the multi files) m_dump - C:\AbInitio\emp_ip.dml
c:/abinitio/ata/emp_ip1.txt show partial
m_db unload C:\AbInitio\db\oracle.dbc -select "select sum(sal) from emp" (used to
unload the data from table)
m_rollback - It will rollback the records that has been loaded till the last
successful check point of the graph .-d c:/abinitio/abc.rec (delete the recovery
file)
I have done the same, here is the displayed list
m_mkfs C:\AbInitio\MFS\4WAY C:\AbInitio\MFS\p0 C:\AbInitio\MFS\p1 C:\AbInitio\MFS\
p2 C:\AbInitio\MFS\p3
m_aggregate
m_chmod - change the permission of the multi-file
m_cleanup
m_cp
m_db - This command is used for performing database operation from the command
prompt.
m_db_cleanup
m_db_env
m_db_layout
m_dbload
m_dbunload
m_df
m_du
m_env
m_eval
m_kill
m_ls - list the multifiles alone
m_mkdir
m_partition
m_sort
m_touch
m_view_errors -
m_db_gendml loc abc.dml
m_wc - This command is used to count number of records from one or more data
files/multi files.
air commands
--------------
9) Air sandbox run /usr/opt/tdbank/mp/abc.mp run graph from unix
4) Air object versions -verbose <EME Path for the object – /Projects/edf/mp/abc.mp>
— Gives the Version History of the object.
7) Air lock show -project <EME Path for the project – /Projects/edf/.. > — shows
all the files that are locked in the given project
air lock break
1) Air object ls /Projects/edf/dml. > — This is used to see the listing of objects
in a directory inside the project.
3) Air object cat /Projects/edf/dml/abc.dml.. > — This is used to see the object
which is present in the EME.
5) Air project show <EME Path for the project – /Projects/edf/.. > — Gives the
whole info about the project. What all types of files can be checked-in etc.
6) Air project modify <EME Path for the project – /Projects/edf/.. > -extension
<something like *.dat within single quotes> <content-type> — This is to modify the
project settings. Ex: If you need to checkin *.java files into the EME, you may
need to add the extension first.
8) Air lock show -user <ganga123> — shows all the files locked by a user in various
projects.
10) Air project import <EME Path for the object – /Projects/edf/.. > --used to
chechin
11) Air project export <sandbox Path for the object – /Projects/edf/.. > --used to
checkout
air object compare version1 version2 - returns the objects differing in version.
private sandbox,public/comon.
dev-->sit-->prod
pset
graph level parameters
sandbox parameters
proj parameters
pdl
air tag ls -e
air tag create INT_TAG1 <.save_file
echo
env
air tag ls