Remove a File - Help Needed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Remove a File - Help Needed
# 1  
Old 07-05-2006
Error Remove a File - Help Needed

Hi,

I have created a file "-f.txt" or "-f" and now i want to remove this file, I have tried rm -f -f, but you would have understood the problem i am facing. Now please let me know what needs to be done, Also one more question i want to know the difference between Hard Link and Soft Link and which one shoud be preferred.
The above two questions were asked for an interview, please help.

Thanks in advance. Smilie
# 2  
Old 07-05-2006
rm -f ./-f
or

rm -f -- -f
# 3  
Old 07-05-2006
Hey thanks a lot, however can you let me know the difference between hard and soft link and which link needs to be preferred. Thanks for your cooperation
# 4  
Old 07-05-2006
hard link and original file are recodrs in different directories that reference to one index in the file system (hard link can be created only in the file system of original file, hard link and original file cannot be distinguished)
soft link like a shortcut in windows -this is a new file that stores path to the original one (there are 2 indexes, may be in different file systems)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Needed script to FTP a File and generate a quality checksum file

hi all i want a script to FTP a file and should generate a quality checksum file means when I FTP a file from one server to another server it should generate a QC file which should contain timestamp,no.of records in that file Thanks in advance saikumar (3 Replies)
Discussion started by: hemanthsaikumar
3 Replies

2. UNIX for Dummies Questions & Answers

help needed: remove space between certain columns

dear all, i have a data looks like this (i have 3000 columns): rs123 A T T G C C C C C C A A A A A A A A A A A ... rs154 T T G C C C C C A A A A A A A A A A T T G ... rs126 A C C C C C A A A A A A A A A A A A T T G ... I want to remove all the space after the 2nd column and make the... (2 Replies)
Discussion started by: forevertl
2 Replies

3. Shell Programming and Scripting

KSH - help needed for creating a script to generate xml file from text file

Dear Members, I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input. The contents of a single cell of INFO column is like: Area:app - aam Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies

4. Shell Programming and Scripting

shell or perl script needed for ldif file to text file conversion

This is the ldf file dn: sdcsmsisdn=1000000049,sdcsDatabase=subscriberCache,dc=example,dc=com objectClass: sdcsSubscriber objectClass: top postalCode: 29600 sdcsServiceLevel: 10 sdcsCustomerType: 14 givenName: Adelia sdcsBlackListAll: FALSE sdcsOwnerType: T-Mobile sn: Actionteam... (1 Reply)
Discussion started by: LinuxFriend
1 Replies

5. Shell Programming and Scripting

shell command to remove some XML tag is needed

Hi all, I have a file which i have to remove some line from it, the lines that i have to remove from my file is as below: </new_name></w"s" langue="Fr-fr" version="1.0" encoding="UTF-8" ?> <New_name> and it is finding at the middle of my file, is there any command line in linux to do it or do... (10 Replies)
Discussion started by: id_2pc
10 Replies

6. UNIX for Dummies Questions & Answers

Remove Permission Help needed.

How would i remove rwx permission for group and other users for all hidden files (except . and ..) inside /root using a one line command. I have tried below command. # chmod og-rwx /root/.* but this has removed rwx permission for . and .. files . As a result # ls -ld /root drwx------ 3... (4 Replies)
Discussion started by: pinga123
4 Replies

7. Shell Programming and Scripting

Help needed to remove a char from a specified sub-string

Hi! I'm having trouble usind sed to remove the char ' from within a database's varchar register's sql. For example, on the following sql: INSERT INTO patrimonio_municipal.patrimonio_municipal_airc_tmp Values('|Estação Elevatória|',|16723|,'|Grandes Reparações|', '|2010-03-26... (3 Replies)
Discussion started by: cremat0rio
3 Replies

8. Shell Programming and Scripting

please help me how to script atomatic remove file that are not needed

Im new to this forum and also Unix. I need help to solve this Directory Clean-up. Im not sure how to do but i wish someone could help me out. I have to develop a script that can be used to automatically remove files that are not needed. The final script will be developed in two iterations. The... (1 Reply)
Discussion started by: sunilnbalar
1 Replies

9. UNIX for Dummies Questions & Answers

FIND and REMOVE HELP NEEDED!!!

Hello, I am aware of that Find command finds certain files and remove command removes certain files. However, is there a way to Find certain DIRECTORY and remove that DIRECTORY? thank you (3 Replies)
Discussion started by: scooter17
3 Replies

10. UNIX for Dummies Questions & Answers

Find and Remove help needed!!!!

thank you for the help. (1 Reply)
Discussion started by: scooter17
1 Replies
Login or Register to Ask a Question