博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vc编程查找计算机运行记录_如何查找计算机的正常运行时间和安装日期
阅读量:2525 次
发布时间:2019-05-11

本文共 5163 字,大约阅读时间需要 17 分钟。

vc编程查找计算机运行记录

vc编程查找计算机运行记录

computer-uptime

“My computer’s been running for 100 days without a reboot!” “I haven’t in five years!” Geeks love to brag about this stuff. Here’s how to find your uptime and installation date on Windows, Linux, and Mac.

“我的计算机已经运行了100天,没有重新启动!” “五年来我没有 !” 极客们喜欢吹牛。 这是在Windows,Linux和Mac上查找正常运行时间和安装日期的方法。

“Uptime” is a geeky term that refers to how long a system has been “up” and running without a shut down or restart. It’s a bigger deal on servers than typical desktops.

“正常运行时间”是一个令人讨厌的术语,指的是系统已启动并运行了多长时间而没有关闭或重新启动。 与典型的台式机相比,服务器上的交易量更大。

Windows-正常运行时间 (Windows — Uptime)

Your Windows system’s uptime is displayed in . Right-click the taskbar and select Task Manager or press Ctrl+Shift+Escape to open it.

Windows系统的正常运行时间显示在 。 右键单击任务栏,然后选择“任务管理器”,或按Ctrl + Shift + Escape将其打开。

On Windows 8, click the Performance tab and look under “Up time” at the bottom of the window.

在Windows 8上,单击“性能”选项卡,然后在窗口底部的“正常运行时间”下查看。

find-uptime-on-windows-8

On Windows 7 or Vista, you’ll also find this information on then Performance tab — look for “Up time” under System.

在Windows 7或Vista上,您还可以在“性能”选项卡上找到此信息-在“系统”下查找“正常运行时间”。

find-up-time-on-windows-7

Windows-安装日期 (Windows — Installation Date)

You can find the date you installed Windows with the systeminfo command. First, open the Command Prompt — press Windows Key + R, type cmd into the Run dialog, and press Enter. Type the following command into the Command Prompt window and press Enter (note that you must type Original with the capital letter on older versions of Windows).

您可以使用systeminfo命令找到安装Windows的日期。 首先,打开命令提示符-按Windows键+ R,在“运行”对话框中键入cmd ,然后按Enter。 在“命令提示符”窗口中键入以下命令,然后按Enter键(请注意,在较早版本的Windows上,必须键入Original并使用大写字母)。

systeminfo | find /i “Original”

systeminfo | 找到/ i“原始”

If you are using Windows 7 or Vista you might need to use this line instead:

如果您使用的是Windows 7或Vista,则可能需要使用以下代码:

systeminfo | find “Original”

systeminfo | 找到“原始”

find-windows-installation-date

Linux —正常运行时间 (Linux — Uptime)

Many Linux utilities display your uptime, from  to graphical system information utilities.

从到图形系统信息实用程序,许多Linux实用程序都会显示您的正常运行时间。

There’s also a dedicated uptime command to display this information. To see your uptime on Linux, open a terminal window, type the following command, and press Enter:

还有一个专用的正常运行时间命令来显示此信息。 要在Linux上查看正常运行时间,请打开终端窗口,键入以下命令,然后按Enter:

uptime

正常运行时间

find-uptime-on-linux-system

Linux —安装日期 (Linux — Installation Date)

There’s no one standard way to see when you installed your Linux system. What you want to do is find a file that hasn’t been modified since you installed Linux and see when it was created.

没有什么标准方法可以查看何时安装Linux系统。 您要做的是找到自安装Linux以来未修改过的文件,并查看它的创建时间。

For example, Ubuntu’s installer creates log files at /var/log/installer when you install it. You can check when this directory was created to see when the Ubuntu system was installed. To do this, open a terminal window and run the following command:

例如,Ubuntu的安装程序在安装时会在/ var / log / installer中创建日志文件。 您可以检查何时创建此目录,以查看何时安装了Ubuntu系统。 为此,请打开一个终端窗口并运行以下命令:

ls -ld /var/log/installer

ls -ld / var / log / installer

The time and date the folder was created is when you installed your Linux system.

创建文件夹的时间和日期是安装Linux系统的时间。

find-ubuntu-installation-date

You might also try looking at the /lost+found folder, which is generally created when you install Linux and set up your drive. This should work on , too:

您也可以尝试查看/ lost + found文件夹,该文件夹通常是在安装Linux并设置驱动器时创建的。 这也应该适用于 :

ls -ld /lost+found

ls -ld / lost + found

find-linux-system-installation-date

Mac OS X-正常运行时间 (Mac OS X — Uptime)

Your Mac system displays its uptime in the System Information window. Click the Apple menu icon on the bar at the top of your screen, hold down the Option key, and click System Information. Scroll down in the left pane, select Software, and look for “Time since boot” to see your Mac’s uptime.

您的Mac系统在“系统信息”窗口中显示其正常运行时间。 单击屏幕顶部栏上的Apple菜单图标,按住Option键,然后单击“系统信息”。 在左窗格中向下滚动,选择“软件”,然后查找“自启动以来的时间”以查看Mac的正常运行时间。

find-mac-os-x-uptime

You can also use the uptime command on a Mac, too. Press Command + Space, type Terminal, and press Enter to open a terminal window. Run the uptime command.

您也可以在Mac上使用正常运行时间命令。 按Command + Space,输入Terminal ,然后按Enter打开终端窗口。 运行正常运行时间命令。

find-mac-os-x-uptime-in-terminal

Mac OS X-安装日期 (Mac OS X — Installation Date)

You should be able to find when your Mac OS X system was installed from its install.log file. First, open the Console application. Press , type Console, and press Enter to open it. Expand the /var/log folder in the sidebar, scroll down, and click install.log in the list. Scroll up to the top of the install.log file and look at the oldest date there.

您应该能够从install.log文件中找到安装Mac OS X系统的时间。 首先,打开控制台应用程序。 按 ,键入Console ,然后按Enter将其打开。 展开侧栏中的/ var / log文件夹,向下滚动,然后在列表中单击install.log。 向上滚动至install.log文件的顶部,然后查看那里的最早日期。

If you’ve been using your Mac for a while, there may be archived install.log files with the names install.log.0.gz, install.log.1.gz, and so on. Open the oldest one, which is the one that has the highest number in its name.

如果您使用Mac已有一段时间,则可能存在名为install.log.0.gz,install.log.1.gz等的已归档install.log文件。 打开最旧的,即名称中编号最高的那个。

find-mac-os-x-installation-date


This information is interesting, especially when you compare it with other people’s computers. There’s not much practical to be done with this information, of course — it’s mostly for bragging rights.

此信息很有趣,尤其是当您将其与其他人的计算机进行比较时。 当然,使用此信息并没有太多实际操作-主要是为了吹牛。

Image Credit:

图片来源:

翻译自:

vc编程查找计算机运行记录

转载地址:http://shdwd.baihongyu.com/

你可能感兴趣的文章
HttpServletRequest /HttpServletResponse
查看>>
SAM4E单片机之旅——24、使用DSP库求向量数量积
查看>>
从远程库克隆库
查看>>
codeforces Unusual Product
查看>>
hdu4348 - To the moon 可持久化线段树 区间修改 离线处理
查看>>
springMVC中一个class中的多个方法
查看>>
Linux系统安装出错后出现grub rescue的修复方法
查看>>
线段树模板整理
查看>>
[iOS问题归总]iPhone上传项目遇到的问题
查看>>
Python天天美味(总) --转
查看>>
Spring Framework tutorial
查看>>
【VS开发】win7下让程序默认以管理员身份运行
查看>>
【机器学习】Learning to Rank 简介
查看>>
Unity 使用实体类
查看>>
MySQL常见注意事项及优化
查看>>
流畅的Python (Fluent Python) —— 前言
查看>>
Jquery-menu-aim流畅的菜单滑动体验
查看>>
Jquery EasyUI修改行背景的两种方式
查看>>
嵌入式Linux学习笔记(0)基础命令。——Arvin
查看>>
二分图匹配
查看>>