Skip to contentমূল লেখায় যান

Stage 02 · Linuxধাপ 02 · Linux · 9 topics · 27 commands9টি টপিক · 27টি কমান্ড

Working with Files

Create, copy, move, edit, link, archive, and compress files.

UPPERCASE = your own value · red ! = can destroy data · tick a card when you know itUPPERCASE = আপনার নিজের মান · লাল ! = data নষ্ট করতে পারে · জানা হলে কার্ডে টিক দিন

0 / 9 done0 / 9 সম্পন্ন

Working with Files

file FILE
detect the file typefile-এর ধরন বলে দেয়
stat FILE
size, permissions, timestampssize, permission ও সময়ের তথ্য
less FILE
page through a file; q quitsপাতা ধরে file পড়ে; q বন্ধ করে
find DIR -name "*.log"
find files by nameনাম দিয়ে file খোঁজে
find . -type f -mtime -1
files changed in the last dayগত ১ দিনে বদলানো file
du -sh DIR
total size of a directorydirectory-র মোট size

Source 1সোর্স 1Source 2সোর্স 2Source 3সোর্স 3Source 4সোর্স 4Source 5সোর্স 5

Creating Files and Directories

touch FILE
create an empty file, or update its timeখালি file বানায়, বা তার সময় হালনাগাদ করে
mkdir DIR
create a directorydirectory বানায়
mkdir -p DIR/SUB
create the parent directories tooমাঝের directory-সহ বানায়
echo TEXT > FILE
Warningসতর্কতা: write text to a file, replacing itfile-এ text লেখে, আগের লেখা মুছে যায়
echo TEXT >> FILE
append text to a filefile-এর শেষে text যোগ করে
cat > FILE
Warningসতর্কতা: type lines into FILE; Ctrl+D endsFILE-এ লাইন লিখুন; Ctrl+D চাপলে শেষ
mktemp -d
make a temporary directoryঅস্থায়ী directory বানায়

Source 6সোর্স 6Source 7সোর্স 7Source 8সোর্স 8Source 9সোর্স 9Source 10সোর্স 10

Copying and Renaming

cp FILE DST
Warningসতর্কতা: copy a file; replaces an existing DSTfile কপি করে; DST থাকলে তা বদলে যায়
cp -r DIR DST
Warningসতর্কতা: copy a directory and all inside itdirectory ও ভেতরের সব কপি করে
cp -a SRC DST
Warningসতর্কতা: copy, keeping permissions, times, owners, linkspermission, সময়, মালিক ও link ঠিক রেখে কপি করে
cp -i FILE DST
ask before overwritingoverwrite-এর আগে জিজ্ঞেস করে
mv OLD NEW
Warningসতর্কতা: rename it; replaces an existing NEWনাম বদলায়; NEW থাকলে তা বদলে যায়
mv -n OLD NEW
rename, never overwriteনাম বদলায়, overwrite করে না

Source 11সোর্স 11Source 12সোর্স 12

Moving Files and Directories

mv FILE DIR/
Warningসতর্কতা: move a file into a directoryfile-কে directory-তে সরায়
mv *.txt DIR/
Warningসতর্কতা: move all matching filesমিলে যাওয়া সব file সরায়
mv -i SRC DST
ask before overwritingoverwrite-এর আগে জিজ্ঞেস করে
rmdir DIR
delete an empty directoryখালি directory মোছে
rm -i FILE
ask before each deleteপ্রতিটি মোছার আগে জিজ্ঞেস করে
rm FILE
Warningসতর্কতা: delete a file; there is no trashfile মোছে; ট্র্যাশে যায় না
rm -r DIR
Warningসতর্কতা: delete a directory and all inside itdirectory ও ভেতরের সব মোছে

Source 12সোর্স 12Source 13সোর্স 13Source 14সোর্স 14

Editing Files

nano FILE
easy editor; keys are shown on screenসহজ editor; key-গুলো স্ক্রিনে দেখানো থাকে
vim FILE
powerful modal editorশক্তিশালী modal editor
sed -i.bak 's/OLD/NEW/g' FILE
replace text in place, keep a .bak copyজায়গায় text বদলায়, .bak কপি রাখে
export EDITOR=nano
set the default editorডিফল্ট editor ঠিক করে
sudoedit FILE
edit a root-owned file safelyroot-এর file নিরাপদে edit করে

Source 15সোর্স 15Source 16সোর্স 16Source 17সোর্স 17Source 18সোর্স 18Source 10সোর্স 10

Nano

Ctrl+O
save the file (Write Out)file save করে (Write Out)
Ctrl+X
exitবের হয়
Ctrl+W
searchখোঁজে
Ctrl+K
cut the current lineবর্তমান লাইন কেটে নেয়
Ctrl+U
paste the cut lineকাটা লাইন paste করে
Alt+U
undo the last actionশেষ কাজটি undo করে
Ctrl+G
open helphelp খোলে

Source 15সোর্স 15Source 19সোর্স 19

Vim

i
insert mode: start typinginsert mode-এ লেখা শুরু করে
Esc
back to normal modenormal mode-এ ফেরে
:wq
save and quitsave করে বের হয়
:q!
quit and discard changesপরিবর্তন বাদ দিয়ে বের হয়
dd
delete a lineলাইন মোছে
yy p
copy a line, paste itলাইন কপি করে paste করে
/WORD
search; n is the next matchখোঁজে; n পরের match
u
undoundo করে

Source 16সোর্স 16Source 20সোর্স 20

Archiving and Compressing

tar -czf NAME.tar.gz DIR
Warningসতর্কতা: archive and compress with gziparchive করে gzip দিয়ে compress করে
tar -xzf NAME.tar.gz
Warningসতর্কতা: extract a .tar.gz.tar.gz খোলে
tar -tf NAME.tar.gz
list the contents firstআগে ভেতরের তালিকা দেখায়
tar -xzf NAME.tar.gz -C DIR
Warningসতর্কতা: extract into a directoryনির্দিষ্ট directory-তে খোলে
gzip -k FILE
compress, keep the originalমূল file রেখে compress করে
gunzip FILE.gz
decompress; the .gz is removeddecompress করে; .gz file মুছে যায়
zip -r NAME.zip DIR
zip a directorydirectory zip করে
unzip NAME.zip
extract a zipzip খোলে

Source 25সোর্স 25Source 26সোর্স 26Source 27সোর্স 27Source 28সোর্স 28

3 min read3 মিনিটে পড়া যায় · 9 sections9টি সেকশন · 28 sources28টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

Sourcesসোর্স28 · accessed 2026-11-27দেখা হয়েছে: 2026-11-27

Suggest an editএডিটের পরামর্শ দিন
  1. [1]file(1) - determine file type
  2. [2]stat(1) - display file or file system status
  3. [3]less(1) - display the contents of a file in a terminal
  4. [4]find(1) - search for files in a directory hierarchy
  5. [5]du(1) - estimate file space usage
  6. [6]touch(1) - create file, or change file timestamps
  7. [7]mkdir(1) - make directories
  8. [8]mktemp(1) - create a temporary file or directory
  9. [9]cat(1) - concatenate files and print on the standard output
  10. [10]bash(1) - GNU Bourne-Again SHell
  11. [11]cp(1) - copy files and directories
  12. [12]mv(1) - move (rename) files
  13. [13]rm(1) - remove files or directories
  14. [14]rmdir(1) - remove empty directories
  15. [15]The GNU nano text editor
  16. [16]usr_02.txt - The first steps in Vim
  17. [17]sed, a stream editor
  18. [18]sudo(8) - execute a command as another user
  19. [19]Cheatsheet for GNU nano
  20. [20]quickref.txt - Quick reference guide
  21. [21]ln(1) - make links between files
  22. [22]readlink(1) - print resolved symbolic links or canonical file names
  23. [23]ls(1) - list directory contents
  24. [24]inode(7) - file inode information
  25. [25]GNU tar: an archiver tool
  26. [26]GNU Gzip: General file (de)compression
  27. [27]Info-ZIP's Zip
  28. [28]Info-ZIP's UnZip