Re: Help required on the following...

From: Jan Reilink (digiover_at_dsinet.org)
Date: 04/25/03


Date: Fri, 25 Apr 2003 23:01:42 +0200

I know this is comp.unix.misc, but my answers are based on Linux :)
OP doesn't state what OS s/he is using.

Can't answer all questions though

pdqd wrote:
> Hi Friends,
> -
> Could you please guide me on the following...
> Thanks in advance.
>
> 1. How can i use find command so that it searches for only those
> directories for which the user who is running the command has
> permission?
> Also is it possible to skip searching a particular
> directory(directories)?
>

man find

> 2. How to search for a big chunk of text in a file?
>

man grep (man egrep)
man cat
man less

> 3. How to display few lines starting from nth line of a large file (vi
> fails saying memory shortage)
>
> 4. What is the best strategy to remove an entry from the PATH variable
>
> 5. What is the best strategy to remove nth line (or range of lines)
> from a file?
>
> 6. I have a file which has got very large line , how could i use the
> vi to open such a file?
>

vi can display very large lines (but I'm sure even vi has it's
limitations, please define "large line").

man vi, or (in vi) type :viusage or :exusage

> 7. Is it possible to yank a block of text(contiguous but can contian
> partial words, lines etc)?
>
> 8. Is it possible to search for a string in vi with case insensitive
> mode?
>
> 9. If i open many files in vi , how will switch between the windows?
> (like alt-tab feature of win )
>
> 10. How can I know the exact size of a directory? (du <dir-name> lists
> file by file ). also, since the output of the du is in blocks, is
> there any way i can know the size of block in that particular system?
>

man du :
        -h, --human-readable
               Append a size letter, such as M for binary
               megabytes (`mebibytes'), to each size.
        -H, --si
               Do the same as for -h, but use the official SI
               units (with powers of 1000 instead of 1024, so that
               M stands for 1000000 instead of 1048576). (New in
               fileutils-4.0.)
        -m, --megabytes
               Print sizes in megabyte (that 1,048,576 bytes)
               blocks.

> 11. Is there anyway of recovering a deleted file?
>
> 11. How can i know the size of physical memory , hardisk(total of all
> filesystems) of a system?
>

$ cat /proc/[tab][tab]
($ cat /proc/meminfo for instance)

Regards, Jan

-- 
Dutch Security Information Network
http://www.dsinet.org/


Relevant Pages

  • Re: -crawl- YANI for lua scripts.
    ... Why not let player assign two pieces of julery in his ... command to quick-change amulets and one of them will be on my neck -> script ... >> - Defining useful but complex conditions for searching though ingame ... names of text files with lists of searched objects). ...
    (rec.games.roguelike.misc)
  • Re: Can I mimic a btn_Click() ?
    ... In the sample code instead of searching an event with type of ... Other remote UDP command are> OK as long as the display is not affected. ... Once I'm in the> CalibrateLCD_Clickevent handler my sender and "this" look OK in my> "Autos" window in both cases. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Adding a -D date option to `cat
    ... So, instead of adding 800 bytes to 'cat', we should create a new ... command with a new name, and increase the size of the base system ... singing and all-dancing command for filtering. ... port which I know that no one will ever use, ...
    (freebsd-current)
  • Re: Adding a D - Date option to cat
    ... My automated attrib program - written by a friend - as we both go ... `cat' program, but with ten extra lines added to it. ... the correct answer was to add some new command. ... FreeBSD, which were *copied* from other systems (they weren't even ...
    (freebsd-current)
  • Re: Cygwin/Unix command - would like to export directory listing into txt file
    ... I was actually opening up the actual txt file in Windows. ... "cat theFiles.txt" and the new ... Lara wrote: ... "theFiles.txt" since apparently that command is neglecting to display ...
    (comp.unix.shell)