WTF *Nix

Just another *nix Blog

Archive for April, 2008

man touch

Apr-30-2008 By WTF *Nix

NAME

touch – change file timestamps

SYNOPSIS

touch [OPTION]… FILE…

DESCRIPTION

Update  the  access  and modification times of each FILE to the current
time.

Mandatory arguments to long options are    mandatory  for    short  options
too.

-a     change only the access time

-c, –no-create
do not create any files

-d, –date=STRING
parse STRING and use it instead of current time

-f     (ignored)

-m     change only the modification time

-r, –reference=FILE
use this file’s times instead of current time

-t STAMP
use [[CC]YY]MMDDhhmm[.ss] instead of current time

–time=WORD
change the specified time: WORD is access, atime, or use: equiv-
alent to -a WORD is modify or mtime: equivalent to -m

–help display this help and exit

–version
output version information and exit

Note that the -d and -t options accept different time-date formats.

If a FILE is -, touch standard output.

AUTHOR

Written by Paul Rubin, Arnold Robbins, Jim  Kingdon,  David  MacKenzie,
and Randy Smith.

REPORTING BUGS

Report bugs to <bug-coreutils@gnu.org>.

COPYRIGHT

Copyright (C) 2005 Free Software Foundation, Inc.
This  is  free  software.   You may redistribute copies of it under the
terms      of      the       GNU        General      Public       License
<http://www.gnu.org/licenses/gpl.html>.     There    is NO WARRANTY, to the
extent permitted by law.

SEE ALSO

The full documentation for touch is maintained as a Texinfo manual.  If
the  info  and  touch programs are properly installed at your site, the
command

info touch

should give you access to the complete manual.

Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg

man cpio

Apr-30-2008 By WTF *Nix

NAME

cpio - copy files to and from archives

SYNOPSIS

cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message] [-O [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--format=format] [--message=message] [--null] [--reset-access-time] [--verbose] [--dot] [--append] [--block- size=blocks] [--dereference] [--io-size=bytes] [--quiet] [--force-local] [--rsh-command=command] [--help] [--version] < name- list [> archive] cpio {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format] [-M message] [-R [user][:.][group]] [-I [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--make-directo- ries] [--nonmatching] [--preserve-modification-time] [--numeric-uid- gid] [--rename] [-t|--list] [--swap-bytes] [--swap] [--dot] [--uncondi- tional] [--verbose] [--block-size=blocks] [--swap-halfwords] [--io- size=bytes] [--pattern-file=file] [--format=format] [--owner=[user][:.][group]] [--no-preserve-owner] [--message=message] [--force-local] [--no-absolute-filenames] [--sparse] [--only-ver- ify-crc] [--quiet] [--rsh-command=command] [--help] [--version] [pat- tern...] [< archive] cpio {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]] [--null] [--reset-access-time] [--make-directories] [--link] [--quiet] [--pre- serve-modification-time] [--unconditional] [--verbose] [--dot] [--dereference] [--owner=[user][:.][group]] [--no-preserve-owner] [--sparse] [--help] [--version] destination-directory < name-list

DESCRIPTION

GNU cpio is fully documented in the texinfo documentation. To access the help from your command line, type info cpio The online copy of the documentation is available at the following address: http://www.gnu.org/software/cpio/manual
Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg

Midlife Samba Crisis on a FreeBSD

Apr-29-2008 By WTF *Nix

The other day let’s put this in short, called out to do a job on Thursday night @ 4:30PM turn around at 3:30AM I was headed home from doing a recovery effort on a offsite location.

Well little here nor there, I have created a pretty little Script for anyone wanting to use this if they find themselves where their FreeBSD locks up, fstab is all borked, everything is array and you have another server you moved all files too just in case of hardware failure and have access via ssh. Where this script, you can move all of the samba/share files and folders in one shot that you gave temporary access to this server while you were fixing the failed Samba.

This script will move all the “Changed” files and folders and preserve all permissions and ownership so you don’t have to dig through and chown and chmod NOTHING. So in the few hours that these shared files were being accessed you can safely restore all the files back to Samba-1 server from Samba-2 server.

#!/bin/sh
# A advanced scp command to copy files, folders that have been modified after a specified time by WTFNIX.com
#
mkdir -p REVfiles
touch -t 0804250140 REVmark #Date and time format: year, month, day, hour minute
find $1 -newer REVmark | cpio -pdu REVfiles
cd REVfiles
tar -cf $1.tar $1
gzip $1.tar
scp $1.tar.gz root@IPADDRESS:/samba
cd ..
rm -rf REVfiles
rm -rf REVmark

I sure as hell hope this helps someone out if they need it, just copy the code and create a .sh script on their server using vi or whatever editor you use.

Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg

Apache Error Log File(s)

Apr-27-2008 By WTF *Nix

Alot of questions always keep coming too me, where do I “FIND” apache log files or where do I “locate” them? Well keywords find and locate can both help you find them within a *nix box. Literally they can, because both are commands. Anyhow normally on a blank box /var/log/httpd/error_log file is a good source for error information. Unlike the /var/log/httpd/access_log file, where this is no standard-type formatting within this file.

Typical errors, should I say will be found within this error_log file where HTTP queries and requests for files that don’t exist (40r), or are forbidden (404) for certain directory requests. You will also see startup errors, which will also help you troubleshoot any apache startup issues you may face. Also, as many know or don’t pretty much all CGI script errors will be found in there as well. Many times CGI breaks or fails with a blank screen on your browser, you can find it in here as well. Hope this helps some out and Google indexes this post rapidly to take down about 20 e-mails a week. :P

Remember if you were working on a page and wanted to watch for errors in real-time, feel free to use the ssh command “tail -f /var/log/httpd/error_log” (Less the quotes.)

Enjoy!

Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg

Reading this god forsaken Microsoft Article on InfoWorld and this is what you get?

unsafe-Infoworld

I would really like to know what they are to prove off their site using unsafe client-side scripting… Anyhow back on topic, go read this at your own risk or read it here, which all sources are from the following link: :)

infoworld.com/article/08/04/23/Microsoft-posts-XP-SP3-to-TechNet-MSDN_1.html

Microsoft on Tuesday afternoon said it was delaying delivery of Windows XP Service Pack 3 (SP3) to paying subscribers of its IT and developer networks because it had given Windows Vista SP1 higher priority.

Not long before midnight, however, subscribers of both TechNet and Microsoft Developer Network (MSDN) reported that the service pack had appeared unannounced on the networks.

“To meet high customer demand for Windows Vista Service Pack 1 (SP1), we have optimized available bandwidth and prioritized MSDN/TechNet delivery channels for Windows Vista SP1 downloads in all Windows languages,” the company said in an e-mailed statement when asked earlier to explain why it was not offering subscribers the finished Windows XP service pack.

“Once we have satisfied this demand, we will roll out Windows XP SP3 via MSDN/TechNet,” the statement continued.

Yesterday, Microsoft announced that it had finished Windows XP SP3 and would post the upgrade on Windows Update and its online download site next Tuesday, April 29. Subscribers to the TechNet and Microsoft Developer Network (MSDN) services, however, were told it wouldn’t be available for download until sometime “within the next month.” Today, Microsoft confirmed May 2 as the date SP3 would be added to the TechNet and MSDN download lists.

The delay did not sit well with some TechNet and MSDN subscribers, who took Microsoft to the woodshed over the move. In messages posted to the TechNet support forum, many compared the situation to a February incident when Microsoft refused to let subscribers download Vista SP1, but under pressure, reversed that decision about two weeks later.

Users on the support forum were skeptical of Microsoft’s reason for the delay. “Microsoft… your [sic] one of the biggest companies in the world, and you can not supply the bandwidth and other network resources, to accommodate your loyal subscribers?” asked a user identified as Happy Tom.

“Time for Microsoft to look at other ways to deploy updates to its paying customers then if it can’t handle the load,” said another user going by OilerNut.

Earlier Tuesday, TechNet subscribers griped that while they could not download XP SP3, the release to manufacturing, or RTM, build had already found its way onto pirated software sites. “Congratulations Microsoft, RTM finally found [its] way to the Torrent sites,” said Torrentzer. “And our MSDN subscription will definitely run out this year without any renewal.”

“Sad when torrent sites get it before legitimate technet subscribers do,” said GlassVial. “I honestly don’t see the point in renewing my technet when it comes due if I can get something via torrent before I can get it here.”

In fact, BitTorrent search sites such as The Pirate Bay now list the RTM build, marked as 5512, for download.

The point became moot late Tuesday, when Microsoft unexpectedly added Windows XP SP3 to the TechNet and MSDN download lists, subscribers reported. “I’m downloading the XP SP3 ISO which has just been added to the list!” said jstewart, one of the first to post the news to the TechNet forum, in a message time-stamped 10:10 p.m. Eastern time.

“Nice!!! it’s on MSDN as well!” said Brooks around 10:40 p.m. EST.

Microsoft was not available late Tuesday to explain what caused the change of heart.

Now all that being said, I think Microsoft is pulling the Ponzi Scheme now on investors… This is their problem and one too many freaking chiefs and not enough Indians there. :( :( Anyhow our friends at The Pirate Bay will take care of you, if you need anything :P

Just wanted to post this here and the damn lame scripting InfoWorld has on their website… I hope they fix that, cause that doesn’t look good!

Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg