how will u execute a file in unix?
. filename
./
. \
/ filename
How do you move a process which is running background to foreground?
fg pid
bg pid
mv pid
none of the above
Which comman can be used to find the user with which you are logged in the UNIX session
"who am I" and "id"
"who" and "who am I"
"who" and "id"
"who", "who am I", "id"
Command to get the list of files/directories with name containing "UniVar" under the root directory excluding errors.
find / -name "UniVar" $1>list
find / -name "UniVar" $0>list
find . -name "UniVar" $1>list
find . -name "UniVar"
Command used to replace all space with | and create another output file
cat test1 | tr ' ' '|' > test2
cat test1 | cut-d ' ' ' |' > test2
cat test1 | tr '|' ' ' > test2
cat test1
Command used to supress all spaces from a given file named test.
cat test | cut ' '
cat test | tr -s ' '
cat test | tr ' ' ''
cat test > test 1
A file contains data as given below, Line 1 Line 2 Line 3 Line 4 Line 5 A command which can be used to get the second column from this file is
cat test | cut -d ' ' -f1
cat test | cut -d ' ' -f2
cat test | cut -f2
None
Why is VI not recommended for viewing log files ?
Complex
Occupies more memory
Not available in all UNIX servers
Too many commands to remember
Command used to display the contents of the file in reverse order.
tac
cat
tail -f
head
Display only directories from a particular location/folder
ls -d
ls -l | grep "$d"
ls -l | grep "^d"
ls -ltr | grep -d