Thursday, 2 August 2018

Basic UNIX commands

Basic UNIX commands




#########################################UNIX COMMANDS http://mally.stanford.edu/~sr/computing/basic-unix.html ######################################################################


ls      ######## lists your files 
ls -l      ######## lists your files in 'long format', which contains lots of useful information, e.g. the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified. 
ls -a      ######## lists all files, including the ones whose filenames begin in a dot, which you do not always want to see.
more filename      ######## shows the first part of a file, just as much as will fit on one screen. Just hit the space bar to see more or q to quit. You can use /pattern to search for a pattern.
emacs filename      ######## is an editor that lets you create and edit a file. See the emacs page.
mv filename1 filename2      ######## moves a file (i.e. gives it a different name, or moves it into a different directory (see below)
cp filename1 filename2      ######## copies a file
rm filename      ######## removes a file. It is wise to use the option rm -i, which will ask you for confirmation before actually deleting anything. You can make this your default by making an alias in your .cshrc file.
diff filename1 filename2      ######## compares files, and shows where they differ
wc filename      ######## tells you how many lines, words, and characters there are in a file
chmod options filename      ######## lets you change the read, write, and execute permissions on your files. 
gzip filename      ########  compresses files, 
gunzip filename      ######## uncompresses files compressed by gzip.


mkdir dirname      ######## make a new directory
cd dirname     ######## change directory.
pwd     ######## tells you where you currently are.

find . -name refresh_ena.png
find . -name root_menu.xml | xargs grep "FileImportLandingTF"
find ./fusionapps/crm/oats/lib -name "*.jwg" -o -name "*.class" | xargs grep "FileImportLandingTF";
######## for class find inside jar use below command (eg to find : oracle.apps.fnd.applcore.attachments.model.validation.CategoryEntityBean) from mw_local folder (to go to mw_local use : cd /scratch/software/mw_local/)
find . -name '*.jar' -exec grep -l 'oracle\/apps\/fnd\/applcore\/attachments\/model\/validation/CategoryEntityBean' {} \;

############################################################################################################################

No comments:

Post a Comment

Basic UNIX commands

Basic UNIX commands #########################################UNIX COMMANDS http://mally.stanford.edu/~sr/computing/basic-unix.h...