what will this do $cat > file.c ?(file.c is a file in
current directory)
Answers were Sorted based on User's Feedback
Answer / rohit
$cat > file.c, on executing this commnd, teh user is
required to manually terminate the execution of this
process, since cat command is expecting the input parameter
to read, but unable to locate so and also for the file.c,
the file et truncated.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / madhavareddy
cat is used to view the content of the file .
if we have file name like file.c having data
214
215
216.
if we want to see the data give the command cat file.c.
if we want to over write the data in file.c give command
like
cat > file.c
219 (give ctl+D)
now if we want to see the data give
cat file.c
219
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nirupam
If $cat is command then it will give an error. Otherwise it
will owerwrite the existing file i.e. file.c
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / koti
it will create the file with file.c name and at the same time
sdd some data in this file.it means we can file with data.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / hari
see the data for the file.file is current directory.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / maruthi
This is called as purging. we generally use to clear the
contents of the file. The time stamp of the file would not
change. Hence still it would be the current log and the
qouta level of that super user would decrease.
==> It would clear the contents of the file
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / amudha
$cat > file.c
$cat is like a normal variable. since this variable is not
defined elsewhere it will not give any o/p.
In this part ">file.c" will create a new empty
file , 'file.c' in the current time stamp
| Is This Answer Correct ? | 7 Yes | 9 No |
Answer / lavanya
it depends on setting of environmental variable
| Is This Answer Correct ? | 5 Yes | 22 No |
Answer / visu_kvg
it will show an error becuse here $cat will not work like
narmal cat command.$cat is not a command it is a variable
which should be defined prevously according to that the o/p
will depend.
| Is This Answer Correct ? | 10 Yes | 35 No |
Sorry to all Technical person for mistake of Question. Now i am post currect question Why copied file permission is changed in destination. When i give all permission i.e 777 to file and copy that to other location in destination the permission is 755. But if give permission 555 in destination that file permission is 555 and if give permission 444 to file after copy in destination the file permission is 444. These all are happening in normal user. How the umask value is calculate here really i am not understand. Please write the proper answer. Thanks in Advance
What is $0 bash?
What is the difference between pipe (|) and tee command in unix
How to find $ai_serual resolved path by using unix
How to get a particular string as your prompt ? Give syntax of that command?
What is the use of cut command in unix?
How to know a process is a zombie or orphan process?
What is the functions of zambie process?
What does the md command do?
Write a command that will output the sorted contents of a file named in.txt and place the output in another file named out.txt, while at the same time excluding duplicate entries.
What is unix command?
How does the user view the contents of a text file in UNIX?