Unix time 1,234,567,890

“At 11:31:30pm UTC on Feb 13, 2009, Unix time will reach 1,234,567,890″.

This will be Friday, February 13th at 1831 and 30 seconds EST. If you want to find out what time it will be in your local time, try this Perl script courtesy of Matias Palomec:

perl -e ‘print scalar localtime(1234567890),”\n”;’

Now, while this is not the UNIX epoch, Alan Cox does assure us that Linux is now working on 64-bit time, and the UNIX epoch ‘roll-over’ would happen about the time that the sun burnt out.”
Read more

Possibly Related Posts:


Argument list too long

Have you seen error message: “Argument list too long” on Linux or Unix console before?

Basically this is a shell command line length limitations. The error “Argument list too long error message” occurs which anytime a user feeds too many arguments to a single command. Each command under Linux/UNIX accepts a parameter commonly known as command arguments. Normally it apply to Linux or Unix system commands such as ls *, cp *, rm *, mv * and etc.

Find out current command line length limitations:
# getconf ARG_MAX

Result:
131072

To get a better result, you may type command
# echo $(( $(getconf ARG_MAX) – $(env | wc -c) ))

Result:
129006
Read more

Possibly Related Posts:


How to create full right permission on Samba share

Samba is an Open Source/Free Software suite that has, since 1992, provided file and print services to all manner of SMB/CIFS clients, including the numerous versions of Microsoft Windows operating systems. Samba is freely available under the GNU General Public License.

Samba comes with different types of permissions for share and for some reason you may require creating new files and directory with full right permission 777.

The example show as below will guide you how to configure Samba share drive with 777 full right permission for any new files or folders created in /data/shared(example)?

[SHARED]
comment = SHARED data
path = /data/shared
valid users = user1, user2, planetmy
writeable = yes
create mask = 0777
force create mode = 0777
directory mask = 777

max connections = 10
veto files = .??*/.ssh/.profile/.mailrc

Read more

Possibly Related Posts:


Red Hat webcast UNIX to Linux- Rearchitecting for the Future

UNIX to Linux: Rearchitecting for the future.

Date: Tuesday, August 26, 2008
Time: 2 p.m. EDT
Speaker: Joel Berman, Director Marketing Strategy, Red Hat
Erich Morisse, Marketing Manger, Red Hat
Overview:
Want to get more consistency and speed from your systems? Learn about migrating to Linux, the cost-effective solution to making your systems more horizontally scalable.
Receiving winning benchmarks even before it was released, Red Hat Enterprise Linux 5 truly offers the most affordable and sophisticated solution for your organization. Its open source server applications and virtualization capabilities allow you to achieve more while paying less. Use fewer people to manage more machines than on UNIX. Work with the same budget and do more. Red Hat Enterprise Linux 5 has everything you need to move your organization towards a successful future.
Learn more about migrating and get expert advice to help your organization make its move. In this webcast, Joel Berman and Eric Morisse will discuss the benefits and cost savings from a UNIX to Linux migration, including specific case studies and migration experiences. The session will also include a Q&A session to answer your questions about migration.

Read more

Possibly Related Posts:


Linux LAST Login Admin Details Script

Linux Last searches back through the file /var/log/wtmp (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created. Names of users and tty’s can be given, in which case last will show only those entries matching the arguments. Names of ttys can be abbreviated, thus last 0 is the same as last tty0.

Last searches back through the file /var/log/wtmp (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created. Names of users and tty’s can be given, in which case last will show only those entries matching the arguments. Names of ttys can be abbreviated, thus last 0 is the same as last tty0.

When last catches a SIGINT signal (generated by the interrupt key, usually control-C) or a SIGQUIT signal (generated by the quit key, usually control-\), last will show how far it has searched through the file; in the case of the SIGINT signal last will then terminate.

The pseudo user reboot logs in each time the system is rebooted. Thus last reboot will show a log of all reboots since the log file was created.

Basically I have a 3 request from customer as below:

  • display a list of users that have not been login after X days.
  • lock the users that have not been login after X days.
  • delete a users that have not been login after X days.

First, the script will search for UID > 999 then it can use to display the result, lock the user account and delete the user account which I make a remarks.

The original script can be found on Unix forums which I have make a small modification.

#Script START here 

Read more

Possibly Related Posts:


Next Page →

Planet Malaysia

  • Follow us on Twitter


  • web www.planetmy.com