Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | Questions | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Found 10 tips, Displaying 1 - 10 
 
Sort by 
 
 Create tar archive and compress in one step
This command will create a tar archive of directory 'dir' and compress it using gzip, the output file will be dir.tgz. tar cf - dir | gzip -c > dir.tgz
     
More...

07/07/08
 
 
 Copy filesystem to another filesystem using tar
We assume /source/dir is a filesystem, if there are other filesystems under /source/dir they will also be copied to /destination/dir cd /source/dir tar -cf - . | ( cd /destination/dir ; tar -xpvf - )
     
More...

05/18/07
 
 
 Change permissions only for directories
A quck tip on how to change permissions for directories under a directory tree without changing permissions for files. In this example all sub directories under the current directory will have execute bit set for owner, group and everyone else: find . -type d -exec chmod a+x {} \;
     
More...

12/16/06
 
 
 Show parent processes for zombies
Use this script to display all processes related (parents and children) to zombie processes on a Unix system. In this case processes are run by user oracle. #!/bin/ksh ZOMBIES=`ps -ef|grep oracle|grep 'defunct'|grep -v grep|awk '{printf("%s ", $2);}'` if [ "X${ZOMBIES}" == "X" ] ; then echo "No zombies found" else ptree ${ZOMBIES} | more fi The output may ...
 More...
04/05/06
 
 
 How to kill Unix user session
One way to kill all sessions for a specific user is to run the following command (replace username with the actual user name): kill -9 `ps -u username | grep -v PID | awk '{ printf ("%s ", $1); }'` Of course you should only use the -9 option when you really ...
     
More...

01/25/06
 
 
 Find out what files are used by a process on Unix
To see what files are being accessed by a specific process use pfiles $ pfiles [process id]
 More...
12/16/05
 
 
 View the process tree on Unix
To see the process tree i.e. display all children of a process use ptree This will show all processes and their children: $ ptree - or - This will show tree for a specific process $ ptree [process id]
     
More...

12/16/05
 
 
 How to find all hard links to a file
Use find command to get a list of all hard links to a file. 1. Find out the inode number for the file ls -asldi [filename] 2. Run find find . -inum [inode number]
     
More...

12/12/05
 
 
 Convert DOS (Windows) file to Unix (ISO) format
DOS text files on Unix will appear with ^M at the end of the line. Use dos2unix command to convert DOS files to ISO format: $ dos2unix dosfile.txt unixfile.txt
     
More...

11/17/05
 
 
 Find out what processes are accessing a file
To find out what processes are accessing a file on Unix run fuser command i.e. $ fuser -u filename
     
More...

11/11/05
 
 


Recent tips & tricks
Operating Systems > Linux : How to set idle session timeou...
Databases > Oracle > Performance Tuning : Copy SQL plan baseline into an...
Databases > Oracle > Performance Tuning : Display TX blocking locks
Databases > Oracle > ASM : Handy ASM commands in SQLPLUS

More categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Mobile Phones / Tablets | Office Software
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com