Удаление одного символа из начала имен файлов

Согласно статье базы знаний IBM для демона ptp файл журнала имеет следующий формат:

  • Отметка времени

    Time when the message was received. The date and time information are represented as text, UNIX time stamp (with fractional seconds), or both forms (in this case, an extra field is added), depending on the global:statistics_timestamp_format setting. When you import the log file to plotting software, if the software can understand UNIX time, set the time stamp format to unix or both, because some software do not interpret the fractional part of the second when it converts the date and time from text.

  • Состояние

    The state of the port. For more information about various port states, see PTP daemon port states.

  • Идентификатор часов

    Port identity of the current best master, as defined by IEEE 1588 standard. This ID is the local clock's ID if the local clock is the best master. This parameter is displayed as clock_id or port (host). Port is the PTP clock port number, not the User Datagram Protocol (UDP) port numbers. The clock ID is an Extended Unique Identifier (EUI)-64 64-bit ID, converted from the 48-bit MAC address, by inserting 0xfffe at the middle of the MAC address.

  • Односторонняя -задержка

    Current value of one-way delay (or mean-path delay) in seconds, calculated by the ptpd daemon that is in the slave state from the delay request and delay response message exchange.

  • Смещение от главного

    Current offset value from master device in seconds. It is the main output of the PTP engine that is in the slave state. This value is the input for clock corrections in the clock servo algorithms. This value is typically measured when estimating the performance of the slave device.

  • Раб к хозяину

    Intermediate offset value (seconds) extracted from the delay request and delay response message exchange. This value is used for computing one-way delay. If the last value was rejected by a filter, the previous value is shown in the log file. This value is zero (0) if the delay response messages are not received.

  • Ведущий к ведомому

    Intermediate offset value (seconds) extracted from the sync messages. This value is used for computing the offset value from the master devices. If the last value was rejected by a filter, the previous value is shown in the log file.

  • Наблюдаемый дрейф

    The frequency difference between the slave clock and the master clock as measured by the integral accumulator of the clock control proportional integral (PI) servo model. This value stabilizes when the clock offset value is stabilized, and this value is used to detect clock stability.

  • Получен последний пакет

    This field shows which message was received last. It displays S for sync messages and D for delay response messages. If a slave device logs no D entries, it means that the slave device is not receiving delay response messages because of network issue.

  • Среднее значение задержки в одну сторону -

    One-way delay mean computed over the last sampling window.

  • Односторонняя -задержка std dev

    One-way delay standard deviation computed over the last sampling window.

  • Смещение от основного среднего

    Offset from master mean computed over the last sampling window.

  • Смещение от главного стандартного устройства

    Offset from master standard deviation computed over the last sampling window.

  • Наблюдаемый средний дрейф

    Observed drift or local clock frequency adjustment mean computed over the last sampling window.

  • Наблюдаемый дрейф стандартного отклонения

    Observed drift or local clock frequency adjustment standard deviation computed over the last sampling window. A lower value indicates that the clock is controlled less aggressively. Therefore, the value is more stable.

0
05.03.2020, 21:27
2 ответа

В каталоге, содержащем эти файлы, введите

for file in _*; do mv "$file" "${file#_}"; done

${file#exp}удаляет самое короткое совпадение шаблона expс начала file.

5
28.04.2021, 23:21

Существует renameкоманда (, написанная Ларри Уоллом )она является частью Debian и других дистрибутивов. Он позволяет переименовывать файлы так же, как sedпозволяет преобразовывать строки в файле.

Итак, если sed будет работать со строкой текста с sed -i 's/^_//' file-name. Затем переименование будет работать с именем файла -с rename 's/^_//' file-name.

Обязательно используйте правильное rename, существует более одной программы с таким именем.

1
28.04.2021, 23:21

Теги

Похожие вопросы