[SLUG] WAS Broken symlinks - NOW Cookbook

Gavin Baker gavbaker at ntlworld.com
Fri Sep 20 14:03:00 BST 2002


On Fri, 2002-09-20 at 12:11, Adams, Jamie wrote:
> 
> > Sure, you can email them to me. Anyone! Everyone! :)
> > 
> > You could also put a "Submit a oneliner!" link or something on the
> > SLUG-cookbook(tm) page, who knows, someone from Canada could sumbit one.
> > I would rather you handle the -tohtml side, at least until the website
> > goes into a feature/design freeze ;)
> > 
> lol, fair enough. Just let me have them as an when you get them and I will
> post them up. So, just for confirmation, what exactly are we wanting people
> to submit?

I guess anything thats useful, things of the format

  "I want to do <foo>"
  You can do <foo> using bar(1) or baz(3) like this..

Things like

  "How do i see how much disk space is being used?"
  
  You can find how much space is left on partitions using df(1)
  "df" will show space usage on all mounted partitions, "df -h" will
  show the same usage information in a human readable (KB, MB) format.

  If you want to see how much space a directory is using, you can use
  du(1). "du" by itself will show the file sizes of all files in the 
  current directory, and in subdirectories, and also print a summary.
  If you just want to see the summary, use "du -s". If you want it in
  a human readable format (KB, MB,..) use "du -sh". If you want to see
  how much space a directory is using, use "du -sh <directory>".

  If you want to (for example) find the size of your mp3 collection, 
  you can use find(1) to find them all, then pipe them to du(1)
  "find -name '*.mp3' | du -hc"
  
or

  "What the hell do i do with this (.Z|.tar|.tar.gz|.tgz|.gz|.bz|.zip)
  file?"

  gzip(1) archives
  gunzip file.gz (to extract)
  zcat file.gz (to view (cat))

  bzip2(1) archives
  bunzip2 file.bz2 (to extract)
  bzcat file.bz2 (to view)

  tar(1) archives  
  tar -xvf file.tar (to extract)
  tar -xvf file.tar -C /target/dir (to extract to /target/dir)
  tar -xvzf file.tar.gz (to gunzip and extract the tar file)
  tar -xvjf file.tar.bz2 (to bunzip2 and extract the tar file)


What do you think?

Anyone want to contribute? :)

Regards,
Gav

(PS, i haven't checked the above for accuracy or completeness)





More information about the Scarborough mailing list