Flashcards
LX0-103 ALL (2)
Cards in this deck (109)
- 1Cron: what does / representevery
e.g. */5 in the minutes col is every 5 minutes - 2Cron: what operators are there in a crontab?/ (every e.g. */5)
- (through e.g. 1-5)
, (and e.g. 1,2,3,4,5) - 3what is the filename size limit for ext3?255 characters
- 4What does the ? system wildcard represent?a single character
e.g. b??k matches a word with two characters between - 5What does the * system wildcard represent?any number of characters
e.g. b*k would match words beginning with b and ending with k - 6What is file globbing?using wildcards to search and match file names
- 7what would g[oe]d match as a system wildcarda 3 letter word starting with g, then either a o or an e and then d
e.g. god or ged - 8what does ls -F showfile types
- 9how would you copy a file and be prompted to prevent overwriting?cp -i
- 10preserve permissions when copyingcp -p
- 11What does cp -a doan archive copy - recursive and preserves ownership/datestamps
- 12what does cp -u do?only copies a file if the target is newer than destination
- 13What is a tarball?an archive
- 14how would you creates a zipped tar archive?tar cvfz
- 15what are the tar options?c (copy)
v (verbose)
f (file archive - recursive)
z (use gzip to compress) - 16how would you extract a zipped tar archivetar xvfz
- 17compress a single filegzip
- 18extract a single zipped filegunzip
- 19What is a hard link?A directory entry (file) pointing to the inode of a file
- 20what is a soft/symbolic link?a pointer to another path that is resolved when requested
- 21when can't a hardlink be used?across filesystem e.g. usb drive cd rom etc.
- 22What is the advantage of a hardlink?it is faster as a direct access to file rather than a shortcut to another file
- 23create a hardlinkln
- 24create a symbolic linkln -s
- 25change an existing symbolic linkln -is
- 26change an existing hard linkln -i
- 27What is SUID?SetUID is a permission bit that when set, runs executable with the permissions of the owner rather than the user
- 28Set SUIDchmod u+s
- 29what is SGID?Set Group ID is a permission bit that when set runs executable with group permissions
- 30Set GUIDchmod g+s
- 31What is a Sticky Bit?A directory level permission bit that prevents files being removed by anybody except the user
- 32Set a sticky bit on a directorychmod o+t
- 33what does newgrp do?changes the current group ID to named one during the login session
- 34What does umask dosets default file creation permissions for the current login session
- 35what are the default file permissions that umask is applied to?files = 666
folders = 777 - 36what file permissions would a new file have if a umask of 022 was applied?644
or
rw-r--r-- - 37what permissions would be applied to a new dir with a umask of 011?766
or
rwxrw-rw- - 38what does the chattr command do?changes file attributes
- 39how would you add/remove file attributes?chattr + / chattr -
- 40name some chattr file attributes+ i (immutable - can't be deleted)
+s (secure delete)
+a (apprend only)
+c (compress) - 41Where does whereis search?binaries, libraries and man pages
- use to find commands - 42Where does which search?Your PATH location
- 43what does the type command doTells you how a command will be interpreted e.g. whether it is a shell command or the path that will run
- 44What does dd do?copy and create files
- 45use dd to copy/create a fileif/of/bs/count:
dd if= of= bs= count= - 46what is /dev/zeroa resource device that supplies zeros e.g. to use with dd to overwrite a partition/file with zeros
- 47Where is the libraries config file?/etc/ld.so.conf
- 48refresh library cacheldconfig
- 49Set an environment variableexport LD_LIBRARY_PATH=
- 50top: update every (n) secondswhen starting: top -d (n)
inside: s - 51top: watch specific processestop -p PID(s) (up tp 20)
- 52top: close after (n) updatestop -n (n)
- 53How can you see server uptime and load avaerages?top & uptime
- 54nice: what is the default priority?10
- 55nice: start a program with nice valuenice -n (val)
- 56kill a processkill -15 PID (gracefully shutdown)
kill -9 PID (force quit)
killall (all processes related to name) - 57run a terminal command that won't be interrupted if terminal session interruptednohup
- 58how top send a current process/program to the background?ctrl-z
- 59start a process in the background&
- 60list background processesjobs
- 61bring background process to the foregroundfg (as listed by jobs)
- 62where is nohup.out created?in the current directory if possible, otherwise in the user's home directory
- 63show memory stats for systemfree
- 64find: flag to search permissions-perm
- 65find: flag search for file-type f
- 66find: run a command on returned result-exec
- 67format a new devicemkfs -t
- 68mount a device to a foldermount
- 69partition a devicefdisk
- 70when using fdisk what do you have to do before leaving to save any changes?w (write)
- 71automatically mount a device at bootadd it to /etc/fstab
- 72what does mount -a/umount -a do?mount/unmount all devices listed in /etc/fstab
- 73swap: associate file/partition swap spacemkswap
- 74swap: turn on swapswapon
- 75swap: persist swap through system bootadd it to /etc/fstab as type swap
- 76what is /media used for in FHSusually stores mount points for removable hardware e.g. usb keys, cdrom etc
- 77display mounted file systems and disk filespace usage (human readable)df -h
- 78display size of file/directory contentsdu
- 79show size of everything in directorydu -a(h)
- 80what is the difference between fsck and e2fsck?They are the same utility except that e2fsck only handles ext filesystems, fsck handles other linux filesystems
- 81check filesystem integrity and automatically repairfsck -a /e2fsck -a
- 82how would you check the integrity of a filesystem?use fsck/e2fsck on an UNMOUNTED filesystem
- 83Check the integrity of all filesystemsfsck -A/e2fsck -A
- 84what is mke2fs?a utility to create ext filesystems on a partition (like mkfs)
- 85what is debugfsext filesystem debugging utility
- 86what does dumpe2fs do?similar to debugfs but dumps info to terminal rather than interactive
- 87what does tune2fs do?adjust tunable filesystem parameters for ext filesystems
- 88XFS utilities?xfs_copy
xfs_dump
xfs_admin
in /usr/bin - 89what does the time command do?shows how long it takes to execute a command e.g. time
- 90How might you run a program./program
/path/to/program
sh program.sh - 91How could you search the bash history?ctrl+r and start typing a command name
- 92bash: move to end of linectrl + e
- 93bash: move to beginning of linectrl + a
- 94bash: clear everything in front of cursorctrl+x+back
- 95bash: clear everything behind the cursorctrl+k
- 96where are user's bash configuration files?.bashrc and .profile in home areas
- 97where are the global bash config files?/etc/profile /etc/bash.bashrc
- 98bash: set an environment variableexport VARIABLE=something
- 99unset an environment variableunset
- 100show all defined variablesenv
- 101what does xargs doexecutes commands on stdin or file delimited by spaces or newlines
- 102what does join do?joins linea of two files on a common field
- 103what does uniq do?omits repeated lines
- 104count lines in a filecat -n or nl
- 105set up disk quotasadd usrquota and grpquota to fstab
add quota.user and quota.group to filesystem
run quotacheck -auvgm - 106set and check quotasquota, edquota, repquota
- 107What is a limitation of SysVInit?it can only start processes sequentially
- 108What is Upstart?Sysvinit replacement for newer ubuntu(14) releases
- 109What is the advantage of upstart?it can start packages in parallel resulting in faster boot times
Information
- Description
- Linux+ Linux+ LX0-103 Flashcards on LX0-103 ALL (2), created by matt_b_uwe on 12/08/2015.
- Created by
- matt_b_uwe
- Views
- 4
- Rating