This documentation covers some basic Linux commands used with Oracle.
In these examples, the example file name is filename.ext. Substitute the correct filename as necessary.
1. To list files in a directory:
ls
2. To list files in a directory in list format:
ls –l
3. To change directory to the oracle directory under /u0:
cd /u0/oracle
4. To change to the parent directory:
cd ..
5. To rename file1 to file2:
mv file1 file2
6. To remove a file:
rm filename.ext
7. To remove a directory, together with subdirectories:
rm –r directory
8. To get disk space free for all mounted file systems:
df -h
9. To change permissions on a file:
chmod 777 filename.ext
10. To change ownership of a file to applmgr and group dba (you may need to do this as root user):
chown applmgr:dba filename.ext
11. To create a symbolic link name /usr/bin/java to file /usr/local/jdk1.3.1_19 /bin/java
ln –s /usr/local/jdk1.3.1_19/bin/java /usr/bin/java
12. To tar all files in directory (to create one file contains all files in the directory):
tar cvf * filename.tar
13. To untar all files in directory:
tar xvf * filename.tar
0 Comments.