Basic Linux Orduithe ar Linux agus Windows Córais Oibriúcháin
Tá an scríbhneoireacht úsáideach dóibh siúd ar mian leo tús a chur leis orduithe Linux. Here you will find the most common commands that are used in Linux.
Más mian leat a reáchtáil Linux orduithe ar Windows ansin a shuiteáil Cygwin. Cygwin is a Linux layer on top of Windows that allows you to use Linux commands in Windows.
Má tá tú shuiteáil Cygwin ar Windows ansin an cosán réamhshocraithe nuair a thosaíonn tú go mbeidh an críochfort Cygwin bheith:
C:\cygwin64\home\{username}
Cruthaigh sampla nua comhad NotePadComment
touch textfile.txt
Eolaire Athrú
cd {directory path\name}
List directory content in long format ( -l ) including hidden files and directories ( -a )
ls -l -a
ls -al
Order files and directories by the time they were last modified
ls -t
List directory with pause and scrolling
ls -l | less
Taispeáin suíomh atá ann faoi láthair (print working directory)
pwd
Sliocht caite 100 focail comhad
tail -100 {filename.extension}
Sliocht dtús 100 sraitheanna de chomhad
head -100 {filename.extension}
Cóipeáil comhad
cp {source} {destination}
Bog comhad
mv {source} {destination}
Déan eolaire nua
mkdir {new directory name}
Scrios an comhad
rm {filename}
Delete an empty directory
rmdir {directory to remove}
rm -d{directory to remove}
Delete directory and its contents
rm -r {directory to remove}
rm -R{directory to remove}
Sórtáil an t-ábhar comhad
sort {filename to sort}
Bain iontrálacha dhúbailt i gcomhad
uniq {filename to remove duplicates}
Comhaid Comhbhrúigh
gzip {filename}
Comhbhrúigh eolaire
gzip -r {directory name}
Comhairigh líon na línte agus na focail i gcomhad téacs
wc {filename}
Search text within files for matching string pattern (case sensitive)
grep 'word' {filename}
Search text within files for matching string pattern (case insensitive)
grep -i 'word' {filename}
Search with a directory
grep -R Arctic /home/ccuser/workspace/geography
Ábhar taispeáint de chomhad téacs
cat
sed stream editor (similar to find and replace)
sed 's/snow/rain/' forests.txt
Athraigh an comhad agus eolaire ceadanna
chmod {options} {permissions} {filename}
Liosta orduithe déanaí a úsáidtear
history
Go huathoibríoch tascanna sceideal
cron
crontab
Athraigh ceadanna comhad
chmod {permission number} {some file or directory}
chmod 777 /storage
Athraigh ceadanna comhad Athchúrsach
chmod -R {permission number} {some file or directory}
