• Keine Ergebnisse gefunden

Unix/Linux Command Reference.comFile Commands

N/A
N/A
Protected

Academic year: 2021

Aktie "Unix/Linux Command Reference.comFile Commands"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Unix/Linux Command Reference .com File Commands

ls – directory listing

ls -al – formatted listing with hidden files cd dir - change directory to dir (.. to go one

“up”)

cd – change to home

pwd – show current directory mkdir dir – create a directory dir rm file – delete file

rm -r dir – delete directory dir rm -f file – force remove file

rm -rf dir – force remove directory dir cp file1 file2 – copy file1 to file2

cp -r dir1 dir2 – copy dir1 to dir2; create dir2 if it doesn't exist

mv file1 file2 – rename or move file1 to file2 if file2 exists, moves file1 into directory file2.

cat > file – type into file (exit with Ctrl-D) less file – output the contents of file (exit with 'q')

head file – output the first 10 lines of file tail file – output the last 10 lines of file tail -f file – output the contents of file as it grows, starting with the last 10 lines

ln -s file link – create symbolic link link to file

Process Management

app & – start app in the background

ps – display your currently active processes top – display all running processes

kill pid – kill process id pid

killall proc – kill all processes named proc * bg – lists stopped or background jobs; resume a stopped job in the background

fg – brings the most recent job to foreground

File Permissions

chmod mode file – change the permissions of file to mode, which consists of a combination of letters:

who: u (user), g (group), o (others), a (all)

how: + (add), - (remove), = (set)

what: r (read), w (write), x (execute) Examples:

chmod g+rx file – read and execute for group chmod u=rwx file – rwx for owner

For more options, see man chmod.

SSH

ssh user@host – connect to host as user

ssh-copy-id user@host – add your key to host for user to enable a keyed or passwordless login scp user@host:remote_file . – copy remote file to local filesystem

scp local_file user@host:remote_dir – copy local file to remote host

Searching

grep pattern files – search for pattern in files grep -r pattern dir – search recursively for pattern in dir

command | grep pattern – search for pattern in the output of command

locate file – find all instances of file

System Info

man command – show the manual for command passwd – change you password

quota – show your quota df – show free space on disk du – show directory space usage

w – display who is logged on this machine whoami – who you are logged in as

finger user – display information about user uname -a – show kernel information

cat /proc/cpuinfo – cpu information cat /proc/meminfo – memory information date – show the current date and time which app – show which app will be run by default

Compression

tar -czf file.tar.gz files – create a (compressed) archive of files with Gzip compression

tar -xf file – extract the files from an archive (compressed or uncompressed)

gzip file – compresses file and renames it to file.gz

gzip -d file.gz – decompresses file.gz back to file

Network

ping host – ping host and output results wget file – download file

wget -c file – continue a stopped download

Keys

<Tab> – command completion

<Up>/<Down> – previous/next command in history Ctrl+C – terminates the current command

Ctrl+Z – stops the current command, resume with fg in the foreground or bg in the background Ctrl+D – log out of current session, similar to exit

Ctrl+A – go to the beginning of the line Ctrl+E – go to the end of the line Ctrl+K – erase to the end of the line Ctrl+U – erases the whole line

Ctrl+R – type to search for a recent command

!! - repeats the last command

exit – log out of current session

Referenzen

ÄHNLICHE DOKUMENTE

In addition to providing expanded file storage space, the file server is a mechanism for user sharing and exchange of files/documents. As indicated, the server

NortTlally the 1 K byte RAM buffer is set up to contain the rleader of the sector to be read and the disk state machine state compares this to the data stream corn ing off

Human Intellect,&#34; AFIPS PROCEEDINGS-FALL JOINT COMPUTER

Useful to make sure files are identical, DIR Sorted current or declared directory files with sizes and disk space used and remaining are displayed on console with this command..

Then insert the newly created CP/M operations diskette in disk drive A, and insert the NEVADA SOFTWARE distribution diskette in drive Band type (ctl-c) to

operations sign extension sizeof operator sizmem function sprintf function sscanf function stack stack location stack overflow SP stack pointer stack size standard error standard

account names and security codes stored in both the account's user identification item (in the SYSTEM dictionary) and the. individual file definition items within

Shortly you will see your oromot reaooear.. In order to redirect some of you logical devices to other comouters, you must run the orogram PCCMD.COM.. This