3.2.6 改变控制台的显示模式

3.3.2 FreeBSD File Flags

# chflags sunlink file1

# chflags nosunlink file1

# ls -lo file1

The nosuid mount(8) option will cause these binaries to silently fail. That is, they will fail to execute without ever alerting the user. That option is also not completely reliable as a nosuid wrapper may be able to circumvent it; according to the mount(8) manual page.

Even though the shell script in question is an executable file, it will not run with a different EUID or effective user ID. This is because shell scripts may not access the setuid(2) system calls.

/boot/defaults/     Default bootstrapping configuration files; see loader.conf(5).

/etc/defaults/       Default system configuration files; see rc(8).

/etc/namedb/       named configuration files; see named(8).

/etc/periodic/      Scripts that are run daily, weekly, and monthly, via cron(8); see periodic(8).

/etc/ppp/             ppp configuration files; see ppp(8).

/proc/                  Process file system; see procfs(5), mount_procfs(8).

/rescue/              Statically linked programs for emergency recovery; see rescue(8).

/tmp/                  Temporary files. The contents of /tmp are usually NOT preserved across a system reboot. A memory-based file system is often mounted at /tmp. This can be automated using the tmpmfs-related variables of rc.conf(5) (or with an entry in /etc/fstab; see mdmfs(8)).

/usr/libdata/     Miscellaneous utility data files.

/usr/libexec/     System daemons & system utilities (executed by other programs).

/usr/obj/           Architecture-specific target tree produced by building the /usr/src tree.

/var/yp             NIS maps.

Any files that are in the B1 or B2 directories can be reached with the path /A1/B1 or /A1/B2 as necessary. Any files that were in /A1 have been temporarily hidden. They will reappear if B is unmounted from A1.

The root file system can be mounted read-only, making it impossible for you to inadvertently delete or edit a critical file. Separating user-writable file systems, such as /home, from other file systems also allows them to be mounted nosuid; this option prevents the suid/guid bits on executables stored on the file system from taking effect, possibly improving security.

FreeBSD automatically optimizes the layout of files on a file system, depending on how the file system is being used. So a file system that contains many small files that are written frequently will have a different optimization to one that contains fewer, larger files. By having one big file system this optimization breaks down.

FreeBSD features the growfs(8) command, which makes it possible to increase the size of file system on the fly.

ad       ATAPI (IDE) disk

da       SCSI direct access disk

acd     ATAPI (IDE) CDROM

cd       SCSI CDROM

fd        Floppy disk

passno

This determines the order in which file systems should be checked. File systems that should be skipped should have their passno set to zero. The root file system (which needs to be checked before everything else) should have its passno set to one, and other file systems' passno should be set to values greater than one. If more than one file systems have the same passno then fsck(8) will attempt to check file systems in parallel if possible.

mount

-a

Mount all the file systems listed in /etc/fstab. Except those marked as “noauto”, excluded by the -t flag, or those that are already mounted.

-f

Force the mount of an unclean file system (dangerous), or forces the revocation of write access when downgrading a file system's mount status from read-write to read-only.

The -o option takes a comma-separated list of the options, including the following:

noexec

Do not allow execution of binaries on this file system. This is also a useful security option.

nosuid

Do not interpret setuid or setgid flags on the file system. This is also a useful security option.

Each process is uniquely identified by a number called a process ID, or PID, and, like files, each process also has one owner and group. The owner and group information is used to determine what files and devices the process can open, using the file permissions discussed earlier. Most processes also have a parent process. The parent process is the process that started them. For example, if you are typing commands to the shell then the shell is a process, and any commands you run are also processes. Each process you run in this way will have your shell as its parent process. The exception to this is a special process called init(8). init is always the first process, so its PID is always 1. init is started automatically by the kernel when FreeBSD starts.

One of the most useful sets is auxww. a displays information about all the running processes, not just your own. u displays the username of the process' owner, as well as memory usage. x displays information about daemon processes, and ww causes ps(1) to display the full command line for each process, rather than truncating it once it gets too long to fit on the screen.

PIDs are assigned starting from 1, go up to 99999, and wrap around back to the beginning when you run out (a PID is not reassigned if it is already in use). 当您运行到超过限制时,这些编号会回转分配.

TIME is the amount of time the program has been running on the CPU, as most programs spend a lot of time waiting for things to happen before they need to spend time on the CPU.

top command to look up memory.

One for total size, and one for resident size--total size is how much memory the application has needed, and the resident size is how much it is actually using at the moment.

FreeBSD sends the process the Segmentation Violation signal (SIGSEGV). If an application has used the alarm(3) system call to be alerted after a period of time has elapsed then it will be sent the Alarm signal (SIGALRM).SIGTERM and SIGKILL SIGHUP, SIGUSR1, and SIGUSR2

# /bin/kill -s HUP 198

Why Use /bin/kill?: Many shells provide the kill command as a built in command; that is, the shell will send the signal directly, rather than running /bin/kill. This can be very useful, but different shells have a different syntax for specifying the name of the signal to send. Rather than try to learn all of them, it can be simpler just to use the /bin/kill ... command directly.

/bin/kill -s KILL 1    quick way to shutdown your system.

shell

USER         Current logged in user's name.

PATH         Colon-separated list of directories to search for binaries.

DISPLAY     Network name of the X11 display to connect to, if available.

SHELL         The current shell.

TERM         The name of the user's type of terminal. Used to determine the capabilities of the terminal.

TERMCAP     Database entry of the terminal escape codes to perform various terminal functions.

OSTYPE         Type of operating system. e.g., FreeBSD.

MACHTYPE     The CPU architecture that the system is running on.

EDITOR         The user's preferred text editor.

PAGER         The user's preferred text pager.

MANPATH     Colon-separated list of directories to search for manual pages.

Under csh or tcsh a command like this would set EDITOR to /usr/local/bin/emacs:

% setenv EDITOR /usr/local/bin/emacs

Under Bourne shells:

% export EDITOR="/usr/local/bin/emacs"

# echo "/usr/local/bin/bash" >> /etc/shells

% chsh -s /usr/local/bin/bash

You can look through the boot messages again by viewing /var/run/dmesg.boot.

The online manual is divided up into numbered sections:

1.User commands.

2.System calls and error numbers.

3.Functions in the C libraries.

4.Device drivers.

5.File formats.

6.Games and other diversions.

7.Miscellaneous information.

8.System maintenance and operation commands.

9.Kernel developers.

You can use man to search for keywords in the command descriptions by using the -k switch:

% man -k mail        == apropos mail

So, you are looking at all those fancy commands in /usr/bin but do not have the faintest idea what most of them actually do? Simply do:

% cd /usr/bin

% man -f *

or

% cd /usr/bin

% whatis *

阅读(1015) | 评论(0) | 转发(0) |

matlab sunlink工具箱,FreeBSD handbook Unix Basics相关推荐

  1. matlab x12,用MATLAB最优化工具箱的相关函数编程求解: minf(X)=x12+2x22一2x1x2—4x1,X0=[0,0]T...

    用MATLAB最优化工具箱的相关函数编程求解: minf(X)=x12+2x22一2x1x2-4x1,X0=[0,0]T 更多相关问题 红旗H5的核心卖点:()A. 时尚B. 驾控C. 科技D. 安全 ...

  2. matlab拟合工具箱cftool

    matlab拟合工具箱cftool %拟合数据曲线:线性最小二乘法是解决曲线拟合的最常用的方法, %1.多项式拟合函数:p=polyfit(x,y,n);求p拟合函数在xi处的近似值pi=polyva ...

  3. matlab模糊控制工具箱使用和模糊控制pid实例参考

    Matlab模糊控制工具箱为模糊控制器的设计提供了一种非常便捷的途径,通过它我们不需要进行复杂的模糊化.模糊推理及反模糊化运算,只需要设定相应参数,就可以很快得到我们所需要的控制器,而且修改也非常方便 ...

  4. 利用Matlab优化工具箱解数独问题

    前一阵使用Matlab的优化工具箱,发现可以求解数独问题,有意思!实际上,Matlab优化工具箱有两个:Optimization Toolbox和Global Optimization Toolbox ...

  5. Algorithm之PrA:PrA之nLP非线性规划算法+Matlab 优化工具箱的GUI求解非线性规划

    Algorithm之PrA:PrA之nLP非线性规划算法+Matlab 优化工具箱的GUI求解非线性规划 目录 PrA之nLP非线性规划算法 操作图文教程 PrA之nLP非线性规划算法 (1).编写M ...

  6. matlab ltiview应用例子,Matlab控制工具箱(网络软件)

    Matlab控制工具箱的应用 --基于Matlab R2010a(7.10.0) 1.线性时不变系统浏览器LTI Viewer 在Matlab的command Window中,建立LTI对象,之后使用 ...

  7. MATLAB信号处理工具箱函数列表分类

    **现将MATLAB信号处理工具箱函数进行分组,便于记忆查询和长期回顾.(只解释基本用途,具体用法请在help目录下查询)** Waveform Generation(波形产生) chairp: 产生 ...

  8. matlab 系统辨识工具箱,MATLAB系统辨识工具箱的应用.ppt

    MATLAB系统辨识工具箱的应用 MATLAB系统辨识工具箱的应用 1.系统的表示方法 下图标出了基本的输入输出结构,其中: 输入信号: 输出信号: 假设方框中的系统为线性系统,可以得出输入输出信号的 ...

  9. matlab神经网络工具箱创建神经网络,matlab神经网络工具箱创建神经网络

    matlab神经网络工具箱创建神经网络 为了看懂师兄的文章中使用的方法,研究了一下神经网络 昨天花了一天的时间查怎么写程序,但是费了半天劲,不能运行,百度知道里倒是有一个,可以运行的,先贴着做标本 % ...

最新文章

  1. PMM 对MYSQL 的监控配制
  2. Angular 原理图 Schematics 学习 - 动手开发一个实际的例子
  3. CentOS7的/tmp目录自动清理规则(转)
  4. 使用tmpfs存放MySQL的临时文件的问题一则
  5. 汇编语言:第二章 寄存器
  6. 【报告分享】2022年私域电商平台趋势报告.pdf(附下载链接)
  7. 迁移到云端之前需要考虑哪些问题?
  8. 用JavaScript简单编程——基础篇
  9. 微信小程序商城源码,带前后端,基于node
  10. Python词云图的几种制作方法
  11. 第八届蓝桥杯国赛Java b组 填字母游戏
  12. 旷视科技科创板IPO上会在即,毫不吝啬研发投入
  13. vue富媒体编辑器组件:vue-wangeditor的使用
  14. 20189320《网络攻防》第八周作业
  15. 移动数据安全防护措施有哪些
  16. 小程序调用服务器图片错误,微信小程序列表图片加载错误处理
  17. 正则匹配手机号和座机号包括分机号
  18. Machine Learning Basics(2)
  19. 原生高性能抓包工具Proxyman,送给爱学习的你
  20. python组件有多少个_python-计算,排序和重新排列组件

热门文章

  1. 桶排序Bucket sort(转)
  2. PowerDesigner 学习
  3. POJ 1458 Common Subsequence DP LCS 最长公共子序列
  4. 转载 Android入门学习_代码常用布局
  5. javascript jquery ajax动态提交多个参数 api测试
  6. 汉字转换成拼音的代码(asp版)
  7. python经济统计_给统计人讲python(3)模拟城市_数据分析
  8. c# linux 效率,c# – linux / mono上的HTTP性能
  9. java实现定时任务 schedule_Java定时任务的三种实现方式
  10. 官方华为鸿蒙os2.0,华为“新平板”6月2日登场,搭载麒麟9000,首发预装鸿蒙OS!...