LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (https://www.linuxquestions.org/questions/aix-43/)
-   -   doubt on {} and shell delete cmds on AIX (https://www.linuxquestions.org/questions/aix-43/doubt-on-%7B%7D-and-shell-delete-cmds-on-aix-803754/)

shravee 04-23-2010 09:13 AM

doubt on {} and shell delete cmds on AIX
 
hi all,

Query 1.

what is the use/purpose/meaning of " {} " in find /home -name chah.log -exec ls -l {} \;


Query 2.

I am working on AIX. when I create a script file and start writing commands and if i want to delete a letter / word , then I find it very difficult to do it.
in short: how to delete a letter or a word in a script file. my backspace or delete key has NO significance.

regards
shravee

catkin 04-23-2010 09:16 AM

{} represents the file that find has found.

Regards question 2 (better to ask one question per thread to avoid confusion) which editor are you using?

grail 04-23-2010 10:11 AM

I would hazard a guess you are using vi.
If you are not able to use vim or some other editor, then:

delete letter - x
delete word - dw

If you enter a number prior to the above you will delete that many, 2x will delete 2 letters.

shravee 04-23-2010 11:52 AM

hi catkin.

I am using vi editor.
so plz tell me what is the command to delete a letter and delete a word.

regards
shravee

MTK358 04-23-2010 01:02 PM

Quote:

Originally Posted by shravee (Post 3945443)
I am using vi editor.
so plz tell me what is the command to delete a letter and delete a word.

Did you even read the above posts?

custangro 04-23-2010 01:11 PM

Homework?

pixellany 04-23-2010 03:50 PM

moved to AIX

AlucardZero 04-24-2010 10:19 PM

Use the man pages and Google.

shravee 08-10-2011 10:27 PM

hi,

I have few core files in my working dir.

the dir has foll type of files

core.3423.232.tmp
core.332.3423.txt
core.42342.342.dmp
core.3432.342234.gz
javacore.3423432.3423
core.43243.3424

out of these type of core files i need to remove only the type which is shown in bold.
i.e. core.43243.3424


the nos are not the same, they vary.

can someone please help onthe same. should i use find command or a normal ls will do.

rgds

shravee

catkin 08-11-2011 03:22 AM

Better you start a new thread shravee and define what makes the file name to delete unique -- core.<integers>.<integers> with no .extension on the end?


All times are GMT -5. The time now is 03:48 PM.