|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
Creating and deleting certain files
How would you create and then delete a file called "$SHELL"?
How would you create and then delete a file that begins with the symbol #? How would you create and then delete a file that begins with the symbol -? |
|
#2
|
|||
|
|||
|
what's your personal take on all of that?
|
|
#3
|
|||
|
|||
|
Quote:
I think I should use cat for creating and rm for removing but I'm not sure of the exact syntax for this. |
|
#4
|
|||
|
|||
|
Quote:
'touch' for creating 'rm' for removing 'man touch' - for details on 'touch' 'man rm' - for details on 'rm' 'man ksh' - for details of 'ksh' shell [if that's what you're using] |
|
#5
|
|||
|
|||
|
Quote:
1. > '$SHELL' rm '$SHELL' 2. > '#aaa' rm '#aaa' 3. > '-aaa' rm - '-aaa' or rm anything_not_existent '-aaa' Regards ![]() |
|
#6
|
|||
|
|||
|
Quote:
Wouldn't it be this for #3? rm -- '-aaa' |
|
#7
|
|||
|
|||
|
Quote:
ys, but many *nix does not know the '--' option this always work rm ./-aaa or sure the absolute name note the single quotes are useless.
__________________
working on Solaris[5-9], preferred languages french and C. |
|
#8
|
|||
|
|||
|
Quote:
So in Unix just using > without cat is used to create files with no text right? |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Creating and deleting certain files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|