tricky ques

Status
Not open for further replies.

ravix

Right off the assembly line
1) can you create a file in linux with name as x/y: containing a '/'.

2) does this still works:
echo date is 'date'
and we get output as
date is <date/time here>
 

JGuru

Wise Old Owl
I think this not a tips & tricks solution!! @Ravix is just asking an answer for his
question. Since this is a Open-Source related question it can be at 'Open Source'
section. Since it's not a Tips n Tricks solution , no need to move this thread!!
 

Satissh S

Youngling
@ravix:

1. No it was not possible to create the file f/g, eg. if i type
# emacs f/g
it opens the file g within a unknown directory f in the buffer but it only saves the file inside directory 'f' once i issue 'mkdir f'. This is understandable as directories are container files and to the filesystem a file say my_coolmp3.mp3 within the music directory is a file with actual name as /home/user/music/my_coolmp3.mp3. Atleast thats my understanding of the file system concepts. :) someone correct if wrong.

Also a file may have several hardlinks to a file so maybe its one of the hardlinks. But a file gets deleted only when the last possible hardlink is deleted.

2. the output i get for the stanzas,
$ echo date is 'date'
date is date
$ echo 'date is 'date''
date is date
$ echo date is date
date is date
$echo 'date is date'
date is date
are all the same.
 

vignesh

Wise Old Owl
You can use this ...

vignesh@linux-dm4c:~> echo date is $(date)
date is Sun Jul 2 05:41:35 IST 2006
 

GNUrag

FooBar Guy
You can use this however,
$ echo date is `date`
date is Sun Jul 2 13:41:32 IST 2006

Note that those are back ticks ` . Adding a back tick `command` is equivalent to $(command)
 
Status
Not open for further replies.
Top Bottom