Unix Interview Tips

Unix Interview Tips

Find the list of Unix Commands which will be useful white attending the Unix Based Interviews.

Unix command to List files by date in Unix
ls -l | grep “12 Jul”

Unix command to remove blank line in a file
grep -v “^$” filename > newfilename
cat filename grep -v “^$”

Unix command to list lines with a range
Eg: list line from 5 -10 in string.txt
head 10 string.txt | tail -5

Empty file contents without changing inode information
cp /dev/null filename

How to change the timestamp of file/directory to Existing time
touch filename

How to Change timestamp of file/directory to the request time
Example : Modify the file timestamp to   may 10 10:24

Modify ur file, then give the following command
touch -t 200805101024 filename

Ways to create Empty file in Unix
touch filename
cat >filename

About mohan

This is Mohan Jayapalan author of TechPages Blog.I am a part time blogger and Currently working for private Software Concern.

© Copyright 2010-2016 www.techpages.org · All Rights Reserved · Powered by WordPress ·