美文网首页
Linux系统常用命令

Linux系统常用命令

作者: zippozeng | 来源:发表于2023-03-16 14:49 被阅读0次

ls(list directory contents)

1|rk356x_box:/ # ls --help
usage: ls [-ACFHLRSZacdfhiklmnpqrstuwx1] [--color[=auto]] [FILE...]

List files.

what to show:
-a  all files including .hidden    -b  escape nongraphic chars
-c  use ctime for timestamps       -d  directory, not contents
-i  inode number                   -p  put a '/' after dir names
-q  unprintable chars as '?'       -s  storage used (1024 byte units)
-u  use access time for timestamps -A  list all files but . and ..
-H  follow command line symlinks   -L  follow symlinks
-R  recursively list in subdirs    -F  append /dir *exe @sym |FIFO
-Z  security context

output formats:
-1  list one file per line         -C  columns (sorted vertically)
-g  like -l but no owner           -h  human readable sizes
-l  long (show full details)       -m  comma separated
-n  like -l but numeric uid/gid    -o  like -l but no group
-w  set column width               -x  columns (horizontal sort)
-ll long with nanoseconds (--full-time)
--color  device=yellow  symlink=turquoise/red  dir=blue  socket=purple
         files: exe=green  suid=red  suidfile=redback  stickydir=greenback
         =auto means detect if output is a tty.

sorting (default is alphabetical):
-f  unsorted    -r  reverse    -t  timestamp    -S  size

example:

rk356x_box:/sdcard/Android/data/com.sundray.meeting # ls -lsh
total 10M
 10M -rw-r----- 1 root   ext_data_rw  20M 2023-03-17 15:14 BJCastChannel_1673923040340.h264
2.0K drwxrws--- 2 system ext_data_rw 4.0K 2023-02-21 11:44 cache
2.0K drwx--S--- 3 system ext_data_rw 4.0K 2023-03-17 14:56 files

df(disk free)

显示指定磁盘文件的使用情况。如果没有指定文件,则显示所有挂载的文件系统的磁盘使用情况。

rk356x_box:/ # df --help
usage: df [-HPkhi] [-t type] [FILE...]

The "disk free" command shows total/used/available disk space for
each filesystem listed on the command line, or all currently mounted
filesystems.

-a      Show all (including /proc and friends)
-P      The SUSv3 "Pedantic" option
-k      Sets units back to 1024 bytes (the default without -P)
-h      Human readable (K=1024)
-H      Human readable (k=1000)
-i      Show inodes instead of blocks
-t type Display only filesystems of this type

Pedantic provides a slightly less useful output format dictated by Posix,
and sets the units to 512 bytes instead of the default 1024 bytes.

使用

rk356x_box:/ # df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 1.8G  832K  1.8G   1% /dev
tmpfs                 1.8G     0  1.8G   0% /mnt
/dev/block/mmcblk2p15  11M  104K   11M   1% /metadata
/dev/block/dm-0       1.2G  1.1G   99M  92% /
/dev/block/dm-2       426M  424M  1.2M 100% /vendor
/dev/block/dm-4       600K  596K  4.0K 100% /odm
/dev/block/dm-3       140M  140M  432K 100% /product
/dev/block/dm-1        51M   51M  160K 100% /system_ext
tmpfs                 1.8G     0  1.8G   0% /apex
tmpfs                 1.8G  264K  1.8G   1% /linkerconfig
/dev/block/mmcblk2p14 1.9G  300K  1.9G   1% /cache
/dev/block/mmcblk2p16 122M   31M   91M  26% /sundrayconfig
/dev/block/mmcblk2p20 6.5G  1.2G  5.2G  20% /data
tmpfs                 1.8G     0  1.8G   0% /data_mirror
/dev/fuse             6.5G  1.2G  5.2G  20% /mnt/user/0/emulated

du(disk usage)

rk356x_box:/ # du --help
usage: du [-d N] [-askxHLlmc] [FILE...]

Show disk usage, space consumed by files and directories.

Size in:
-k      1024 byte blocks (default)
-K      512 byte blocks (posix)
-m      Megabytes
-h      Human readable (e.g., 1K 243M 2G)

What to show:
-a      All files, not just directories
-H      Follow symlinks on cmdline
-L      Follow all symlinks
-s      Only total size of each argument
-x      Don't leave this filesystem
-c      Cumulative total
-d N    Only depth < N
-l      Disable hardlink filter

exaple:

rk356x_box:/sdcard/Android/data # du -sh ./*
8.0K    ./com.rockchips.mediacenter
20M     ./com.sundray.meeting
12K     ./com.sundray.meeting.device.test

kernel

查看内核版本
uname -a
读取内核镜像
cd /data; dd if=/dev/block/mmcblk2p11 of=boot_a.img
写入内核镜像
dd if=boot_a.img of=/dev/block/mmcblk2p11

查看占用率

dmc占用率
cat /sys/class/devfreq/dmc/load
GPU占用率
cat /sys/class/devfreq/fde60000.gpu/load

Android

查看SurfaceFliger的帧率
logcat | grep mFps

相关文章

  • 大数据技术学习路线

    一、大数据技术基础1、linux操作基础 linux系统简介与安装linux常用命令–文件操作linux常用命令–...

  • 嵌入式系统学习进阶

    1、Linux 基础 安装Linux操作系统 Linux文件系统 Linux常用命令 Linux启动过程详解 熟悉...

  • 嵌入式设计师必须get的技能

    1、Linux基础 安装Linux操作系统 Linux文件系统 Linux常用命令 Linux启动过程详解 熟悉L...

  • Linux 常用命令

    表1.1 linux系统的常用命令分类

  • Linux常用命令

    Linux常用命令 查看系统信息常用命令 常用命令-关机或重启命令 命令前结构

  • Linux系统基础命令汇总

    Linux系统学习,总结汇总了linux系统下基础常用的命令: 一.Linux系统基础常用命令 1.命令da...

  • systemctl

    简介 systemctl Linux系统服务管理命令 常用命令

  • Linux基础教程

    Linux基础教程 一、常用命令使用 1.1 常用命令使用 1.1.1 登录和退出Linux系统 1. 启动和登陆...

  • 1.Linux操作系统基础

    1.Linux基础 操作系统:OS Linux是多任务多用户的操作系统. Linux常用命令: 命令框字体调整--...

  • Linux目录涵义及常用命令

    Linux目录涵义及常用命令 Linux系统环境搭建好后,需要了解系统各目录的涵义,这里用图说明。 Linux常用...

网友评论

      本文标题:Linux系统常用命令

      本文链接:https://www.haomeiwen.com/subject/xiqdrdtx.html