2015 Updates Flashcards
getent
- Displays entries from databases configured in /etc/nsswitch.conf
- Most commonly used to query passwd, hosts, group, and services
anacron
Like cron, but looks to see if it has been AT LEAST a certain time since the last time the job was run.
anacron -f
Forces execution of all jobs
anacron -u
Updates the timestamps of all jobs to current time but does not actually run any
anacron -n
Run all jobs immediately
anacron -t
Use the specified file rather than /etc/anacrontab
Can regular users use anacron?
no!
anacron syntax
period_in_days delay_in_minutes
job_identifier
command
who -b
time of last system boot
who -l
print system login processes
who -q
count all login names and number of users logged in
who -u
list logged in users and process id/comment
who -H
print column headers
who -a
print all info
fuser
Display the PIDs of processes using the specified files or file systems
fuser -k
Kills all processes accessing a file
fuser -i
interactive mode
fuser -v
verbose
fuser -u
append username
fuser -a
display all filenames
w -i
display ip addresses instead of hostnames
last -n
show specific number of lines
last -R
suppress hostname
last -F
Print full login and logout times and dates
last -x
Display the system shutdown entries and run level changes
What order do the bash and profile configuration files execute?
/etc/profile
~/.bash_profile
~/.bashrc
/etc/bashrc
Non-login shell will only execute…
/etc/bashrc
~/.bashrc