#mkdir command
Explore tagged Tumblr posts
simple-logic · 8 months ago
Text
Tumblr media
Which is a command to create a new directory? 🗂️
a) mkdir 🖥️
b) mkdir -p 🛠️
c) create dir 🚫
d) newdir 🚪
📂 Time for a tech challenge!
Comment your answer below
3 notes · View notes
lordsheep99 · 2 years ago
Text
Linux Comandos Básicos de Consola / Terminal
Comandos Básicos Linux Me han preguntado infinidad de veces como hacer esto o lo otro en linux, y al decir “abres la consola y….” se han echado a atras con miedo. Este miedo, es infundado, ya que la consola o terminal en linux es nuestra amiga 🙂 Un poco de historia La historia de la informática se remonta a una época en la que la interacción con las computadoras se realizaba exclusivamente a…
Tumblr media
View On WordPress
0 notes
shieldfoss · 1 year ago
Text
3 FHS 4.2: "The following commands ... are required in /bin"
- [...] - ls - mkdir - [...]
You know what's not on that list, but would be between ls and mkdir if it was on that list?
make
why does my distro have /bin/make
what is the point of that
(5 minutes later) .. .ok so my distro is on top of ubuntu, who don't have any info in their references either but they deliver their own stuff, yes, but it's amalgamated with ...
(10 minutes later) ... is cute but I feel like it's too cute you know? "Budgie" has "Raven" what's next, libOwlNest? ...
(5 minutes later again) ... if that's posix compliant and I don't care if you mean 1 or 2, I'll eat my fucking hat ...
(1 minute later) ... wait what happens if I have two window managers and I switch between them? I mean any temux server would keep running so I could just go back to that but what about GUI apps, do they close? Or do they keep running and it's just their window information that gets lost? What even is their window information? I could absolutely write a program where the heavy lifting is done by some background service that'd keep living even if the graphical part died but ...
(5 minutes later) ... I am never going to understand SIGTERM it is simply not ...
51 notes · View notes
shoehorseconstant · 9 months ago
Text
basic terminal commands
pwd = # print working directory
ls = # list files in directory
cd = # change directory
mkdir = # create new directory
cp = # copy files
mv = # move files
rm = # delete files!!!!!!! be careful with this tool because it's dumb!
2 notes · View notes
utopicwork · 1 year ago
Text
Short bash script I wrote for personal use via termux, this will download a video or playlist supported by yt-dlp to the current directory and convert the downloaded file/s into mp3s in an out subdirectory:
yt-dlp --extract-audio $1
mkdir out
for i in *; do ffmpeg -i "$i" "out/${i%.*}.mp3"; done
For id3 tagging I use the eyeD3 command line utility very basically manually on each file:
eyeD3 -a "Artist Name" -A "Album Name" outfile.mp3
6 notes · View notes
tpointtechblog · 2 years ago
Text
Essential Linux Commands: Mastering the Basics of Command-Line Operations
Linux, a powerful and versatile operating system, offers a command-line interface that empowers users with unprecedented control over their systems. While the graphical user interface (GUI) provides ease of use, understanding the fundamental Linux commands is essential for anyone seeking to harness the full potential of this open-source platform. In this article, we will explore some of the…
Essential Linux Commands help users navigate, manage files, and control system processes. Here are some key ones:
ls – List directory contents
cd – Change directory
pwd – Show current directory path
mkdir – Create a new directory
rm – Remove files or directories
cp – Copy files or directories
mv – Move or rename files
cat – View file contents
grep – Search text in files
chmod – Change file permissions
top – Monitor system processes
ps – Display running processes
kill – Terminate a process
sudo – Execute commands as a superuser
Mastering these commands boosts productivity and system control!
2 notes · View notes
codingprolab · 13 days ago
Text
CSC3320 System Level Programming Lab Assignment 3 (Post-Lab)
Part 1: VI Editing – Small file Open your terminal and connect to snowball server. Change your directory to your home directory (cd ~ ), and then create a new directory named as “Lab3” (mkdir Lab3). After that, go to directory Lab3 (cd Lab3) and please download the file “Try.c” (content shown in table below) by the following command (internet access required): cp /home/frondel1/Public/Try.c…
0 notes
arashtadstudio · 15 days ago
Link
Mastering the tree Command in Linux The tree command in Linux provides a visual representation of your directory structure in a tree-like format. In this tutorial, we’ll go through creating a nested folder structure and exploring how to use tree with different flags to inspect it. 1. Installing tree First, install tree using the package manager if it's not already available: sudo apt install tree -y 2. Creating a Sample Directory Structure We’ll create a directory named parent with multiple levels of nested folders and files: mkdir -p parent/child1/grandchild1/greatgrandchild1 mkdir -p parent/child2/grandchild2 mkdir -p parent/child3 touch parent/file1.txt touch parent/child1/file2.txt touch parent/child1/grandchild1/file3.md touch parent/child2/file4.log touch parent/child2/grandchild2/file5.py touch parent/child3/file6.html 3. Exploring with tree Basic Usage Navigate to the parent directory and run tree: cd parent tree Limit Display Depth Use the -L flag to control the depth of directory levels shown: tree -L 2 Show File Sizes and Permissions Use -p for permissions and -h for human-readable file sizes: tree -ph Display Only Directories tree -d Sort by Modification Time tree -t Save the Output to a File tree -L 3 > directory_structure.txt Read the Saved File cat directory_structure.txt Conclusion The tree command is a powerful way to visualize and document filesystem hierarchies. Whether you're auditing a project structure or preparing documentation, it's a handy tool every Linux user should know. For more tutorials like this, make sure to follow our channel and feel free to reach out if you need help with your projects! Subscribe to Our YouTube for More Download as PDF
0 notes
allyourchoice · 1 month ago
Text
Socket.IO setup
Tumblr media
Building Real-Time Applications with Socket.IO setup: Step-by-Step Tutorial
Socket.IO setup. In today's interconnected world, real-time applications are becoming increasingly essential. Whether it's for live chat applications, collaborative tools, or gaming, real-time communication enhances user engagement and makes interactions more dynamic. One powerful tool for building real-time applications is Socket.IO. In this tutorial, we will guide you through the process of building a real-time application using Socket.IO, focusing on key concepts and practical implementation. What is Socket.IO? Socket.IO is a JavaScript library that enables real-time, bidirectional communication between web clients (like browsers) and servers. Unlike traditional HTTP requests, which follow a request-response model, Socket.IO provides a persistent connection, enabling instant data exchange between the client and server. Socket.IO works on top of WebSockets, but it provides fallback mechanisms for environments where WebSockets may not be available. This ensures that real-time communication is possible in a wide range of conditions, making it a versatile choice for building interactive web applications. Prerequisites Before we dive into the tutorial, make sure you have the following: Basic knowledge of JavaScript and Node.js Node.js installed on your machine. You can download it from nodejs.org. A code editor (like Visual Studio Code or Sublime Text). Step 1: Setting Up the Project Start by setting up a basic Node.js project. Create a new directory for your project: bash mkdir real-time-app cd real-time-app Initialize a new Node.js project: bash npm init -y Install Express and Socket.IO: bash npm install express socket.io Express is a lightweight web framework for Node.js that simplifies the creation of web servers. Socket.IO will handle real-time communication between the server and the client. Step 2: Create the Server Now that we've set up the dependencies, let's create a simple server. Create a file called server.js in the project root: js const express = require('express'); const http = require('http'); const socketIo = require('socket.io');// Create an instance of Express app const app = express();// Create an HTTP server const server = http.createServer(app); // Initialize Socket.IO with the HTTP server const io = socketIo(server); // Serve static files (like HTML, CSS, JS) app.use(express.static('public')); // Handle socket connection io.on('connection', (socket) => { console.log('a user connected'); // Handle message from client socket.on('chat message', (msg) => { io.emit('chat message', msg); // Emit the message to all clients }); // Handle disconnect socket.on('disconnect', () => { console.log('user disconnected'); }); }); // Start the server server.listen(3000, () => { console.log('Server is running on http://localhost:3000'); }); Step 3: Create the Client-Side Next, we need to create the client-side code that will connect to the server and send/receive messages in real time. Create a public folder inside the project directory. In the public folder, create an index.html file: html Real-Time Chat Real-Time Chat Application Send const socket = io(); // Connect to the server// Listen for messages from the server socket.on('chat message', function(msg){ const li = document.createElement('li'); li.textContent = msg; document.getElementById('messages').appendChild(li); }); // Handle form submission const form = document.getElementById('form'); form.addEventListener('submit', function(event){ event.preventDefault(); const input = document.getElementById('input'); socket.emit('chat message', input.value); // Send the message to the server input.value = ''; // Clear the input field }); Step 4: Run the Application With the server and client code in place, it’s time to run the application! In your terminal, run the following command: bash node server.js Open your browser and go to http://localhost:3000. You should see the chat interface. Open multiple browser windows or tabs to simulate multiple users. Type a message in the input field and click "Send." You should see the message appear in real-time in all open windows/tabs. Step 5: Enhancements and Improvements Congratulations! You've built a basic real-time chat application using Socket.IO. To enhance the application, consider adding the following features: User authentication: Allow users to log in before they can send messages. Private messaging: Enable users to send messages to specific individuals. Message persistence: Use a database (e.g., MongoDB) to store chat history. Typing indicators: Show when a user is typing a message in real time. Emoji support: Allow users to send emojis and other media. Conclusion Socket.IO setup. In this tutorial, we covered the basics of building a real-time application using Socket.IO. We walked through setting up a Node.js server with Express, integrating Socket.IO for real-time communication, and creating a simple chat interface on the client side. Socket.IO makes it easy to add real-time features to your web applications, enabling more dynamic and interactive experiences for users. With this foundation, you can now start exploring more advanced real-time features and take your applications to the next level! Read the full article
0 notes
innvonixtech · 3 months ago
Text
Unix Commands Every iOS Developer Should Know
When developing iOS applications, many developers focus primarily on Swift, Objective-C, and Xcode. However, a lesser-known yet powerful toolset that enhances productivity is Unix commands. Since macOS is a Unix-based operating system, understanding essential Unix commands can help iOS developers manage files, automate tasks, debug issues, and optimize workflows.
In this article, we’ll explore some of the most useful Unix commands every iOS developer should know.
Why Should iOS Developers Learn Unix?
Apple’s macOS is built on a Unix foundation, meaning that many system-level tasks can be efficiently handled using the terminal. Whether it’s managing files, running scripts, or automating processes, Unix commands can significantly enhance an iOS developer’s workflow. Some benefits include:
Better control over project files using the command line
Efficient debugging and log analysis
Automating repetitive tasks through scripting
Faster project setup and dependency management
Now, let’s dive into the must-know Unix commands for iOS development.
1. Navigating the File System
cd – Change Directory
The cd command allows developers to navigate between directories
{cd ~/Documents/MyiOSProject}
This moves you into the MyiOSProject folder inside Documents.
ls – List Directory Contents
To view files and folders in the current directory:
bash
CopyEdit
ls
To display detailed information, use:
bash
CopyEdit
ls -la
pwd – Print Working Directory
If you ever need to check your current directory:
bash
CopyEdit
pwd
2. Managing Files and Directories
mkdir – Create a New Directory
To create a new folder inside your project:
bash
CopyEdit
mkdir Assets
rm – Remove Files or Directories
To delete a file:
bash
CopyEdit
rm old_file.txt
To delete a folder and its contents:
bash
CopyEdit
rm -rf OldProject
⚠ Warning: The -rf flag permanently deletes files without confirmation.
cp – Copy Files or Directories
To copy a file from one location to another:
bash
CopyEdit
cp file.txt Backup/
To copy an entire folder:
bash
CopyEdit
cp -r Assets Assets_Backup
mv – Move or Rename Files
Rename a file:
bash
CopyEdit
mv old_name.txt new_name.txt
Move a file to another directory:
bash
CopyEdit
mv file.txt Documents/
3. Viewing and Editing Files
cat – Display File Contents
To quickly view a file’s content:
bash
CopyEdit
cat README.md
nano – Edit Files in Terminal
To open a file for editing:
bash
CopyEdit
nano config.json
Use Ctrl + X to exit and save changes.
grep – Search for Text in Files
To search for a specific word inside files:
bash
CopyEdit
grep "error" logs.txt
To search recursively in all files within a directory:
bash
CopyEdit
grep -r "TODO" .
4. Process and System Management
ps – Check Running Processes
To view running processes:
bash
CopyEdit
ps aux
kill – Terminate a Process
To kill a specific process, find its Process ID (PID) and use:
bash
CopyEdit
kill PID
For example, if Xcode is unresponsive, find its PID using:
bash
CopyEdit
ps aux | grep Xcode kill 1234 # Replace 1234 with the actual PID
top – Monitor System Performance
To check CPU and memory usage:
bash
CopyEdit
top
5. Automating Tasks with Unix Commands
chmod – Modify File Permissions
If a script isn’t executable, change its permissions:
bash
CopyEdit
chmod +x script.sh
crontab – Schedule Automated Tasks
To schedule a script to run every day at midnight:
bash
CopyEdit
crontab -e
Then add:
bash
CopyEdit
0 0 * * * /path/to/script.sh
find – Search for Files
To locate a file inside a project directory:
bash
CopyEdit
find . -name "Main.swift"
6. Git and Version Control with Unix Commands
Most iOS projects use Git for version control. Here are some useful Git commands:
Initialize a Git Repository
bash
CopyEdit
git init
Clone a Repository
bash
CopyEdit
git clone https://github.com/user/repo.git
Check Status and Commit Changes
bash
CopyEdit
git status git add . git commit -m "Initial commit"
Push Changes to a Repository
bash
CopyEdit
git push origin main
Final Thoughts
Mastering Unix commands can greatly improve an iOS developer’s efficiency, allowing them to navigate projects faster, automate tasks, and debug applications effectively. Whether you’re managing files, monitoring system performance, or using Git, the command line is an essential tool for every iOS developer.
If you're looking to hire iOS developers with deep technical expertise, partnering with an experienced iOS app development company can streamline your project and ensure high-quality development.
Want expert iOS development services? Hire iOS Developers today and build next-level apps!
0 notes
fromdevcom · 4 months ago
Text
HEIC (High-Efficiency Image Format) is a popular image format used by Apple devices, offering high-quality images with smaller file sizes compared to JPEG. However, this format is not universally supported, which might necessitate converting HEIC images to a more accessible format like PDF. In this article, we'll explore how to convert HEIC images to PDF using JavaScript Node.js. A working example of this tool is available on this page . Prerequisites To follow along with this tutorial, you'll need: Basic knowledge of JavaScript and Node.js. Node.js installed on your system. Familiarity with npm (Node Package Manager). Step-by-Step Guide Step 1: Set Up Your Project First, create a new directory for your project and initialize it with npm. mkdir heic-to-pdf cd heic-to-pdf npm init -y Step 2: Install Required Packages We'll use the following npm packages: heic-convert to convert HEIC images to PNG. pdf-lib to create PDF documents. Install these packages by running: npm install heic-convert pdf-lib Step 3: Write the Conversion Script Create a new JavaScript file, convert.js, in your project directory. This script will handle the conversion process. const fs = require('fs'); const heicConvert = require('heic-convert'); const PDFDocument = require('pdf-lib'); async function convertHeicToPdf(inputPath, outputPath) // Read the HEIC file const heicBuffer = fs.readFileSync(inputPath); // Convert HEIC to PNG const pngBuffer = await heicConvert( buffer: heicBuffer, format: 'PNG', quality: 1 // Set quality to 1 (highest) ); // Create a new PDF document const pdfDoc = await PDFDocument.create(); // Embed the PNG image into the PDF const pngImage = await pdfDoc.embedPng(pngBuffer); const pngDims = pngImage.scale(1); // Add a blank page and draw the PNG image on it const page = pdfDoc.addPage([pngDims.width, pngDims.height]); page.drawImage(pngImage, x: 0, y: 0, width: pngDims.width, height: pngDims.height ); // Serialize the PDF document to bytes (a Uint8Array) const pdfBytes = await pdfDoc.save(); // Write the PDF to a file fs.writeFileSync(outputPath, pdfBytes); console.log(`Converted HEIC to PDF: $outputPath`); Example Usage of the function // Example usage convertHeicToPdf('input.heic', 'output.pdf'); Running the Script To convert a HEIC image to a PDF, run the following command: node convert.js Ensure you have an input.heic file in your project directory. The script will generate an output.pdf file in the same directory. Conclusion Converting HEIC images to PDF using JavaScript is straightforward with the help of heic-convert and pdf-lib. This solution reads a HEIC file, converts it to a PNG image, embeds the PNG into a PDF document, and saves the PDF file. This approach can be extended and integrated into larger applications, providing a practical solution for handling HEIC images in a more accessible format. With this method, you can efficiently convert HEIC images to PDF, making them easier to share and view across different devices and platforms.
0 notes
rwahowa · 5 months ago
Text
Debian 12 initial server setup on a VPS/Cloud server
Tumblr media
After deploying your Debian 12 server on your cloud provider, here are some extra steps you should take to secure your Debian 12 server. Here are some VPS providers we recommend. https://youtu.be/bHAavM_019o The video above follows the steps on this page , to set up a Debian 12 server from Vultr Cloud. Get $300 Credit from Vultr Cloud
Prerequisites
- Deploy a Debian 12 server. - On Windows, download and install Git. You'll use Git Bash to log into your server and carry out these steps. - On Mac or Linux, use your terminal to follow along.
1 SSH into server
Open Git Bash on Windows. Open Terminal on Mac/ Linux. SSH into your new server using the details provided by your cloud provider. Enter the correct user and IP, then enter your password. ssh root@my-server-ip After logging in successfully, update the server and install certain useful apps (they are probably already installed). apt update && apt upgrade -y apt install vim curl wget sudo htop -y
2 Create admin user
Using the root user is not recommended, you should create a new sudo user on Debian. In the commands below, Change the username as needed. adduser yournewuser #After the above user is created, add him to the sudo group usermod -aG sudo yournewuser After creating the user and adding them to the sudoers group, test it. Open a new terminal window, log in and try to update the server. if you are requested for a password, enter your user's password. If the command runs successfully, then your admin user is set and ready. sudo apt update && sudo apt upgrade -y
3 Set up SSH Key authentication for your new user
Logging in with an SSH key is favored over using a password. Step 1: generate SSH key This step is done on your local computer (not on the server). You can change details for the folder name and ssh key name as you see fit. # Create a directory for your key mkdir -p ~/.ssh/mykeys # Generate the keys ssh-keygen -t ed25519 -f ~/.ssh/mykeys/my-ssh-key1 Note that next time if you create another key, you must give it a different name, eg my-ssh-key2. Now that you have your private and public key generated, let's add them to your server. Step 2: copy public key to your server This step is still on your local computer. Run the following. Replace all the details as needed. You will need to enter the user's password. # ssh-copy-id   -i   ~/path-to-public-key   user@host ssh-copy-id   -i  ~/.ssh/mykeys/my-ssh-key1.pub   yournewuser@your-server-ip If you experience any errors in this part, leave a comment below. Step 3: log in with the SSH key Test that your new admin user can log into your Debian 12 server. Replace the details as needed. ssh  yournewuser@server_ip   -i   ~/.ssh/path-to-private-key Step 4: Disable root user login and Password Authentication The Root user should not be able to SSH into the server, and only key based authentication should be used. echo -e "PermitRootLogin nonPasswordAuthentication no" | sudo tee /etc/ssh/sshd_config.d/mycustom.conf > /dev/null && sudo systemctl restart ssh To explain the above command, we are creating our custom ssh config file (mycustom.conf) inside /etc/ssh/sshd_config.d/ . Then in it, we are adding the rules to disable password authentication and root login. And finally restarting the ssh server. Certain cloud providers also create a config file in the /etc/ssh/sshd_config.d/ directory, check if there are other files in there, confirm the content and delete or move the configs to your custom ssh config file. If you are on Vultr cloud or Hetzner or DigitalOcean run this to disable the 50-cloud-init.conf ssh config file: sudo mv /etc/ssh/sshd_config.d/50-cloud-init.conf /etc/ssh/sshd_config.d/50-cloud-init Test it by opening a new terminal, then try logging in as root and also try logging in the new user via a password. If it all fails, you are good to go.
4 Firewall setup - UFW
UFW is an easier interface for managing your Firewall rules on Debian and Ubuntu, Install UFW, activate it, enable default rules and enable various services #Install UFW sudo apt install ufw #Enable it. Type y to accept when prompted sudo ufw enable #Allow SSH HTTP and HTTPS access sudo ufw allow ssh && sudo ufw allow http && sudo ufw allow https If you want to allow a specific port, you can do: sudo ufw allow 7000 sudo ufw allow 7000/tcp #To delete the rule above sudo ufw delete allow 7000 To learn more about UFW, feel free to search online. Here's a quick UFW tutorial that might help get you to understand how to perform certain tasks.
5 Change SSH Port
Before changing the port, ensure you add your intended SSH port to the firewall. Assuming your new SSH port is 7020, allow it on the firewall: sudo ufw allow 7020/tcp To change the SSH port, we'll append the Port number to the custom ssh config file we created above in Step 4 of the SSH key authentication setup. echo "Port 7020" | sudo tee -a /etc/ssh/sshd_config.d/mycustom.conf > /dev/null && sudo systemctl restart ssh In a new terminal/Git Bash window, try to log in with the new port as follows: ssh yournewuser@your-server-ip -i  ~/.ssh/mykeys/my-ssh-key1  -p 7020   #ssh  user@server_ip   -i   ~/.ssh/path-to-private-key  -p 7020   If you are able to log in, then that’s perfect. Your server's SSH port has been changed successfully.
6 Create a swap file
Feel free to edit this as much as you need to. The provided command will create a swap file of 2G. You can also change all instances of the name, debianswapfile to any other name you prefer. sudo fallocate -l 2G /debianswapfile ; sudo chmod 600 /debianswapfile ; sudo mkswap /debianswapfile && sudo swapon /debianswapfile ; sudo sed -i '$a/debianswapfile swap swap defaults 0 0' /etc/fstab
7 Change Server Hostname (Optional)
If your server will also be running a mail server, then this step is important, if not you can skip it. Change your mail server to a fully qualified domain and add the name to your etc/hosts file #Replace subdomain.example.com with your hostname sudo hostnamectl set-hostname subdomain.example.com #Edit etc/hosts with your hostname and IP. replace 192.168.1.10 with your IP echo "192.168.1.10 subdomain.example.com subdomain" | sudo tee -a /etc/hosts > /dev/null
8 Setup Automatic Updates
You can set up Unattended Upgrades #Install unattended upgrades sudo apt install unattended-upgrades apt-listchanges -y # Enable unattended upgrades sudo dpkg-reconfigure --priority=low unattended-upgrades # Edit the unattended upgrades file sudo vi /etc/apt/apt.conf.d/50unattended-upgrades In the open file, uncomment the types of updates you want to be updated , for example you can make it look like this : Unattended-Upgrade::Origins-Pattern { ......... "origin=Debian,codename=${distro_codename}-updates"; "origin=Debian,codename=${distro_codename}-proposed-updates"; "origin=Debian,codename=${distro_codename},label=Debian"; "origin=Debian,codename=${distro_codename},label=Debian-Security"; "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; .......... }; Restart and dry run unattended upgrades sudo systemctl restart unattended-upgrades.service sudo unattended-upgrades --dry-run --debug auto-update 3rd party repositories The format for Debian repo updates in the etc/apt/apt.conf.d/50unattended-upgrades file is as follows "origin=Debian,codename=${distro_codename},label=Debian"; So to update third party repos you need to figure out details for the repo as follows # See the list of all repos ls -l /var/lib/apt/lists/ # Then check details for a specific repo( eg apt.hestiacp.com_dists_bookworm_InRelease) sudo cat /var/lib/apt/lists/apt.hestiacp.com_dists_bookworm_InRelease # Just the upper part is what interests us eg : Origin: apt.hestiacp.com Label: apt repository Suite: bookworm Codename: bookworm NotAutomatic: no ButAutomaticUpgrades: no Components: main # Then replace these details in "origin=Debian,codename=${distro_codename},label=Debian"; # And add the new line in etc/apt/apt.conf.d/50unattended-upgrades "origin=apt.hestiacp.com,codename=${distro_codename},label=apt repository"; There you go. This should cover Debian 12 initial server set up on any VPS or cloud server in a production environment. Additional steps you should look into: - Install and set up Fail2ban - Install and set up crowdsec - Enable your app or website on Cloudflare - Enabling your Cloud provider's firewall, if they have one.
Bonus commands
Delete a user sudo deluser yournewuser sudo deluser --remove-home yournewuser Read the full article
0 notes
kandztuts · 5 months ago
Text
Linux CLI 34 🐧 scp and sftp commands
New Post has been published on https://tuts.kandz.me/linux-cli-34-%f0%9f%90%a7-scp-and-sftp-commands/
Linux CLI 34 🐧 scp and sftp commands
Tumblr media
youtube
a - scp command scp (secure copy) is used to copy files between different Linux systems This happens securely and over SSH syntax → scp [options] source_file destination_path example 1 → copies the text.txt from local system to remote with 192.168.1.10 IP address and at /home/user location example 2 → copies the text.txt from remote system with 192.168.1.10 IP address and at /home/user location to the local system common options: -r → Recursive copy of a directory tree -v → Verbose mode -P port → Specify the port number to be used -C → Compression option (uses zlib or bzip2 compression algorithm) -l limit → Sets a bandwidth limit in bytes/sec for the transfer -q → quiet mode b - sftp command sftp (secure file transfer protocol) is used to transfer files between remote systems This also happens securely and over SSH. It is similar to FTP but uses encryption and authentication. syntax → sftp [options] [user@]host[:directory] example 3 → connects to 192.168.1.10 with user kronos commands: rmdir dirname → deletes the dirname directory mkdir dirname → creates a directory with name dirname rm filename → delete a file get filename /home/kronos → downloads a file to local location put file /remote/location → uploads a file to the remote system man sftp → to see all the options and available commands
0 notes
techdog · 5 months ago
Text
Mount hard drive partition for Linux user
I'm running Linux Mint 22 & wanted to mount a hard drive partition for a user & give them ownership. Here are the Linux command line incantations I used, based on this post:
I want to create a mount point to the data partition at /mnt/data.
1) We need the UUID of the partition to mount as /mnt/data. This command lists the partitions, including their relevant UUIDs:
$ sudo blkid
2) Create the mount point for the partition:
$ sudo mkdir /mnt/data
3) Assign the partition to this mount point by editing /etc/fstab, as root. Add this line:
UUID={uuid from step 1} /mnt/data ext4 defaults 0 0
4) Mount the drive by, as described by /etc/fstab:
$ sudo mount -a
5) Change owner of mount point so that my local account can use it:
$ sudo chown {user name} /mnt/data
0 notes
arashtadstudio · 15 days ago
Link
Mastering the tree Command in Linux The tree command in Linux provides a visual representation of your directory structure in a tree-like format. In this tutorial, we’ll go through creating a nested folder structure and exploring how to use tree with different flags to inspect it. 1. Installing tree First, install tree using the package manager if it's not already available: sudo apt install tree -y 2. Creating a Sample Directory Structure We’ll create a directory named parent with multiple levels of nested folders and files: mkdir -p parent/child1/grandchild1/greatgrandchild1 mkdir -p parent/child2/grandchild2 mkdir -p parent/child3 touch parent/file1.txt touch parent/child1/file2.txt touch parent/child1/grandchild1/file3.md touch parent/child2/file4.log touch parent/child2/grandchild2/file5.py touch parent/child3/file6.html 3. Exploring with tree Basic Usage Navigate to the parent directory and run tree: cd parent tree Limit Display Depth Use the -L flag to control the depth of directory levels shown: tree -L 2 Show File Sizes and Permissions Use -p for permissions and -h for human-readable file sizes: tree -ph Display Only Directories tree -d Sort by Modification Time tree -t Save the Output to a File tree -L 3 > directory_structure.txt Read the Saved File cat directory_structure.txt Conclusion The tree command is a powerful way to visualize and document filesystem hierarchies. Whether you're auditing a project structure or preparing documentation, it's a handy tool every Linux user should know. For more tutorials like this, make sure to follow our channel and feel free to reach out if you need help with your projects! Subscribe to Our YouTube for More Download as PDF
0 notes
arbgit · 6 months ago
Text
جميع أوامر termux للأختراق والتهكير all Commands Termux
 أوامر في تطبيق Termux من خلال هذا المقال سوف نتعرف على كل أوامر termux وشرح اهم الأوامر في تطبيق Termux للأختراق وكيفيه التعامله معه تطبيق Termux يعتبر من اهم التطبيقات التي يجب عليك تثبيته على هاتفك الأندرويد فأنت لست بحاجه لجهاز حاسوب لكي تتعلم الأختراق ولكن علينا اولاً ان نتعرف على التطبيق شرح termux commands list وما هي الاومر الاولى  في تشغيل termux قبل البدء كل هاذا سوف نتعرف عليه من خلال هذا المقال . termux commands list
جميع أوامر termux للأختراق والتهكير all Commands Termux
اوامر termux للاختراق كنا قد نشرنا مواضيع كثيرة حول تطبيق تيرمكس وربما من اشهر هذه المواضيع شرح جميع اوامر Termux لكن اليوم سوف نقدم مجموعه اخرى من الأوامر المهمه والتي من خلالها سوف تتعرف على كيفيه التعامل مع تطبيق تيرمكس بشكل ممتاز دون الحاجه الى اي مساعدة من احد , وربما من اهم ما يجب ان تتعلمه هوا termux commands list اي أوامر تيرمكس وهذه امر مهم جداً فمن دونها لن تتكمن من التعامل مع التطبيق فلكل امر وظيفه معينه يقوم بها مثل تحميل الأدوات والتنقل بين الملفات وفهم الصلاحيات وغيرها اوامر termux .
لكن ما هوا termux وفيما يستعمل , حسناً دعني اجيبك بشكل مبسط تيرمكس اوامر termux هوا تطبيق عبارة عن Terminal اي سطر اوامر مبني على اللنكس من خلاله يمكنك تحميل ادوات الأختراق او وتشغيل سكربتات بللغات برمجيه مختلفه مثل Paython وغيرها فهوا شبيه الى حد ما في نظام Kali linux ولكن تيرمكس يعمل على الهاتف اي لست بحاجه الى جهاز كمبيوتر اوامر termux للاختراق .
أهم أوامر تشغيل termux قبل الأستعمال
pkg update pkg upgrade pkg install python pkg install python2 pkg install python3 pkg install ruby pkg install git pkg install php pkg install java pkg install bash pkg install perl pkg install nmap pkg install bash pkg install clang pkg install nano pkg install zip pkg install unzip pkg install tor pkg install sudo pkg install wget pkg install openssl
أوامر Termux لأنشاء ملفات والتنقل بينها
touch لأنشاء ملف جديد cat أنشاء ملف جديد بمحتوى echo “hello world” انشاء ملف جديد وكتابه بداخله cat >> [file name] – اضافه محتوى في ملف موجود مسبقاً mkdir [name] – انشاء فولدر او ملف جديد
أوامر النسخ واللصق Termux
cp لنسخ الملفات cp -r لنسخ الملف في اي مسار mv يستعمل لنقل الملفات من مسار الى اخر mv -v يستعمل لنقل اي ملف mv [file1 name] نقل واعادة تسميع الملف mv -i التحريك والكتابه فوق الملف mv -f – نقل الملف والكتابه فوقه بشكل اجباري
أوامر التنقل بين الملفات  Termux
cd يستخدم لتنقل بين الملفات cd / يستعمل للرجوع الى ملف الروت cd .. لرجوع خطوة الى الخلف
وهذه أوامر الأخرى اساسيات termux
rm لحذف الملف pwd لمعرفه مسارك wget لتحميل الأدوات git clone لتحميل الأدوات من رابط apt install curl لتحميل apt search للبحث عن حزم unzip لفك الضغط عن الملف bye لعمل اغلاق لسطر الأوامر whoami – لمعرفه اسم المستخدم nano لتعديل على ملف ifconfig لمعرفه اي بي جهازك
تحميل جميع ادوات termux
Termux-kalinetHunter
git clone https://github.com/Hax4us/Nethunter-In-Termux cd Nethunter-In-Termux chmod +X* ./kalinethunter
Lazymux Tool
قد يعجبك ايضا
منذ عام
جميع أوامر termux للأختراق والتهكير all Commands Termux
منذ عام
تحميل كتاب أساسيات Termux للأختراق على الهاتف PDF
منذ عام
كتاب جميع أوامر تطبيق Termux
git clone https://github.com/Gameye98/Lazymux cd Lazymux chmod +X* python2 lazymux.py
Tool-X
pkg install git git clone https://github.com/Rajkumrdusad/Tool-X.git cd Tool-X chmod +x install.aex sh install.aex
اوامر Termux لاستخراج المتاحات
xHak9x
apt update && apt upgrade apt install git python2 sudo git clone https://github.com/xHak9x/fbi.git cd fbi sudo pip2 install -r requirements.txt sudo python2 fbi.py
theHarvester
git clone https://github.com/laramies/theHarvester ls cd theHarvester python2 theHarvester.py pip2 install requests python2 theHarvester.py -d hotmail.com -b google -l 500 python2 theHarvester.py -d yahoo.com -b google -l 500
أوامر termux اختراق wifi
wifiphisher
apt-get install git python apt-get install python python-pip python-setuptools pip install scapy git clone https://github.com/wifiphisher/wifiphisher.git cd wifiphisher python setup.py install cd wifiphisher python wifiphisher
جميع اوامر Terminal Emulator للاندرويد
dhcpcd dmesg dnsmasq dumpstate dumpsys dvz fsck_msdos gdbserver getevent getprop gzip hciattach hd id ifconfig
ash awk base64 bash busybox cat chmod chown cksum clear cmp cp cut date dd df diff dirname echo env expr false fgrep find gawk grep gunzip gzip head id install kill killall ln ls md5sum mkdir mknod mktemp mv nice nl nohup od paste patch pgrep pkill ps pwd readlink realpath rm rmdir sed seq sha1sum sha256sum sha3sum sha512sum sleep sort split stat stty sum tail tar tee test timeout touch tr true uname uniq unzip uptime users wc which xargs yes zcat ls: قائمة الملفات والدلائل في الدليل الحالي اوامر termux للاختراق . cd: قم بتغيير دليل العمل الحالي. mkdir: إنشاء دليل جديد. touch: قم بإنشاء ملف جديد. echo: إخراج النص المحدد. cat: عرض محتويات الملف. grep: ابحث عن أنماط في الإدخال. wget: قم بتنزيل ملف من الإنترنت. curl: نقل البيانات من أو إلى الخادم. apt-get: تثبيت أو إزالة الحزم من مدير الحزم. apt-cache: الاستعلام عن قاعدة بيانات مدير الحزم. find: البحث عن الملفات في التسلسل الهرمي للدليل. gzip: ضغط الملفات أو فك ضغطها. tar: إنشاء أو استخراج أو سرد محتويات أرشيف القطران. ssh: الاتصال بجهاز بعيد باستخدام بروتوكول SSH.
0 notes