File Management: Applicable SSH commands

Step 1:

In some webhosting plans it's possible to access your data via SSH. The following commands are available:

 
Files and folders
cat, tac, less, moreOutput of a file contentcat <file>
cdSwitches the directorycd <directory>
chmodChanges privileges of files/folderschmod -R 777 <directory>
cmp, diffComparison of two filescmp <file1> <file2>
cpCopies files/folderscp <file1> <file2>
csplit, splitSplits files 
cutCuts columns or fields from files 
dirAlias for ls -a1hdir
duEvaluates the storage footprint of files/foldersdu --max-depth=1 -h
grep, egrep, fgrepSearches in filesgrep -i <text> <file>
fileDetermines the file typefile -i <file>
findSearches for filesfind -name "<file>"
headOutput of the initial lines of a filehead <file>
joinMerges filesjoin <file1> <file2>
lnCreates a link pointing to a file/folderln -s <ziel> <name>
lsLists files/foldersls -al
llAlias for ls -alll
laAlias for ls -Ala
lAlias for ls -alFl
mcMidnight Commandermc
md5sum, sha1sum, sumDetermines the checksum of a filemd5sum <file>
mkdirCreates a new foldermkdir <directory>
mvRenames/moves files/foldersmv <file1> <file2>
nlDisplays the content of a file with line numbersnl <file>
patchShows changes to a file on the basis of a diff filepatch < patch.diff
pwdShows the current folderpwd
renameRenames filesrename 's/<text1>/<text2>/g' *
rmDeletes files/foldersrm <file>
rmdirDeletes an empty folderrmdir <directory>
sortAssorts the content of a filesort <file> > <file_sortiert>
tailOutput of a file content from a certain line ontail -n 3 <file>
touchChanges the time stamp of a filetouch <file>
unlinkDeletes filesunlink <file>
wcDisplays the number of lines, terms and characters in a filewc <file>
Compressing and archiving
bzcat, bzless, bzmoreOutput of the content of bzip2 archivesbzcat <file>
bzcmp, bzdiffCompares the the content of bzip2 archivesbzcmp <file1> <file2>
bzegrep, bzfgrep, bzgrepBrowses files inside bzip2 archivesbzegrep <text> <file>
bzip2, bunzip2Packs/unpacks files using bzip2bunzip2 <file>
bzip2recoverRestores defective bzip2 archivesbzip2recover <file>
gzip, gunzipPacks/unpacks files using gzipgunzip <file>
tarArchives files and folderstar cfvz backup.tar.gz <directory>
zcat, zless, zmoreShows the content of gzip archiveszcat <file>
zcmp, zdiffCompares the the content of gzip archiveszcmp <file1> <file2>
zegrep, zfgrep, zgrepBrowses files inside gzip archiveszegrep <text> <file>
zip, unzipPacks/unpacks files using zipunzip <file>
Editors
joe, mcedit, vim/vi, nanoEdits filesmcedit <file>
sed, awk, gawk Transforms strings 
Network
curlTransmits filescurl <url>
dig, nslookupDNS server query 
ftpEstablishes an FTP connectionftp <hostname>
rsyncAligns data between source and targetrsync <quelle> <ziel>
scpSecurely transmits files via the networkscp <user>@<hostname>
sftpEstablishes an SFTP connectionsftp <hostname>
sshEstablishes a secure connection to another clientssh <user>@<hostname>
wgetDownloads files via HTTP/FTPwget <hostname>/<file>
Scripting languages
phpPHP Interpreterphp <file>
composerDependency Manager for PHPcomposer
pearPear 
perlPerlperl <file>
python, python2, python3Pythonpython <file>
pippackage installer for Pythonpip install <modul>
MySQL
mysqldumpCreates a database dumpmysqldump -u LOGIN -p'PASSWORT'  LOGIN > dumpDATUM.sql
mysqlEstablishes a database connection, e.g. in order to restore a database backupmysql -u LOGIN -p'PASSWORT' LOGIN < dumpDATUM.sql
Version Control
bzr  
git  
svnSubversion Client 
Terminal, Shell, Background processes
<Input redirection<command> < <file>
>Redirects the output into a file<command> > <file>
>>Attaches the output to a file<command> >> <file>
|Output redirectionfind | grep <file>
sourceReads and executes commands from a filesource <file>
&Initiates background processes<command> &
2>Redirects the error output<command> 2> <file>
aliasSets a shortcut for a commandalias ll='ls -al'
bgContinues background processes 
clearClears the screen content clear
exportExports environment variablesexport <var>
fgContinues foreground processes 
hashDisplays the path names of already executed commandshash
historyDisplays the already executed commands history
jobsLists halted background processes 
printenv, setDisplays/changes environment variables 
pvMonitors the progression of a task 
resetRestores the terminal character set reset
sleepPuts a process to sleep 
[Strg] + cAborts the current process in the shell ab 
[Strg] + zHalts the current process in the shell 
sttyQueries/changes terminal settings 
unaliasDeletes the alias of a commandunalias ll
watchPeriodically executes the command and shows output 
Miscellaneous
dateDisplays date and time date
echoOutput of textecho "Hello World!"
exitTerminates the current sessionexit
expandConverts tabs into spaces expand <file>
exprPerforms calculationsexpr 1 + 1
groupsDisplays the groups of the current user groups
hostnameDisplays the own hostnamehostname
iconv, recodeConverts character sets 
idDisplays the own username/group nameid
killSend signals to processes, e.g. in order to terminate them 
timePerforms time measurements of processestime <command>
trReplaces characters 
unameDisplays system informationsuname -a
unexpandConverts spaces into tabsunexpand <file>
uniqOne-time output of identical, batched lines 
whoamiDisplays the own login namewhoami
How helpful was this tutorial?

Search in support and FAQ

Seitensuche