Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
73 views

How to install wordlist.txt for gobuster in ubuntu

I found this code sudo apt install wordlist and gave me a various types of wordlist like wamerican etc and these files are not the wordlist .txt file when I used the command gobuster -u (url) -w ...
Pujan Chettri's user avatar
0 votes
0 answers
81 views

How to install wordlist.txt on ubuntu for gobuster

I am using ubuntu download from Microsoft Store and I have gobuster but I don't have any idea on how to install wordlist.txt for gobuster someone please help me out
Pujan Chettri's user avatar
0 votes
3 answers
93 views

Help finding files with the same filename (except what's inside parenthesis) and deleting the smaller size ones

I need to know how to find one or more files with the same filename (except what's inside parenthesis) and delete the one(s) with the smaller size, in a folder. I don't care if it's a GUI app or ...
Nuno Fonseca's user avatar
0 votes
1 answer
76 views

Please explain the copy backup types

The following options are available for the --backup option: none, off never make backups (even if --backup is given) numbered, t make numbered backups existing, nil numbered if ...
user58446's user avatar
  • 113
-1 votes
1 answer
71 views

Moving 3 pics randomly to another directory

I am using Linux and I'm in a folder it has 10 .jpg images I want to move 3 pictures only without selection by name or size for example my folder is /sdcard /DCIM/camera/ I want 3 pictures from it to /...
WoLFyy THETHE's user avatar
4 votes
4 answers
1k views

What command can I use to move files from a directory to another, starting from smaller size to bigger size?

I am looking for a a Linux command that can move files from one directory to another directory in ascending order of file sizes, e.g. first files of size 1 Mb, then 1.2 Mb and then 1.3 Mb, etc.
WoLFyy THETHE's user avatar
0 votes
1 answer
72 views

Bash: Removing Multiple Files

Beginner here... I have a fruit folder, named "apples," that has extra files I want to remove. Remove all files that begin with "red_dk" and "red_lt" Remove all files ...
denvercode's user avatar
0 votes
1 answer
111 views

How to delete matched filenames from a list

I want to scan for filenames in a source directory and all its sub-directoris then print the output to a file like: ls -hR >> del.txt (I, however, don't know how to not list folders) I don't ...
lee genny's user avatar
0 votes
1 answer
260 views

How to select/copy/move an HTML file together with its corresponding folder?

On Windows this is working by default, because the files are associated. Situation is: saving a webpage usually creates two files/folders: An abc.html file with the webpage's main HTML file A folder ...
zx485's user avatar
  • 2,500
0 votes
1 answer
1k views

Why do `ls` and `du` commands show a different size for the same file? [duplicate]

I am currently using Ubuntu 20.04. When I check a file's size using the du command, I get the following output: ubuntu@ip-172-31-49-39:/myxfs$ du -h newquota 4.0K newquota With the ls -la command, ...
Alakananda S's user avatar
1 vote
1 answer
162 views

How to copy from full path to full path under new name with overwrite?

I want to copy a file from one directory to another under a different name, using the full path of both directories. The different name already exists in the destination directory so I want to ...
RTC222's user avatar
  • 257
0 votes
0 answers
132 views

Can te root user access all directories and folders?

Aŕe there files that the root user can't access, because earlier i was using the "du" comand and some files could not be accessed due to permissions
blankC's user avatar
  • 71
1 vote
1 answer
240 views

How to generate multiple files in sequence with data in sequence?

I have to create 50 files in sequence labelled r01.inp to r50.inp and in each file I need this text in sequence as well. #!/bin/bash abc2 r01.inp > r01.log I used echo and touch to create the 50 ...
Muhammad Zahir Siddiqui's user avatar
3 votes
2 answers
87 views

Is it possible to create a series of text files with names based on a pattern and fill them with X characters from /dev/urandom?

Is there a script/tool that will allow me to create N files following a pattern like '[user-defined-string]-N', with N being incrementally increasing numbers ideally starting with a 0 until reaching ...
user avatar
0 votes
0 answers
499 views

How do you figure out what rm -rf deleted

I've accidentally executed rm -rf ~ because I failed to autocomplete a directory and it stayed with my home directory. I was quick enough to kill the command in time, so no real damage (I think) was ...
Joliver's user avatar
  • 101
6 votes
4 answers
1k views

Renaming files with a year prefix from the beginning of the filename to the end

Extreme novice here attempting to figure out how to rename a bunch of files in a directory. I have hundreds of media files that all follow the same syntax for the file name: year - title of movie.avi ...
Zachary Sycks's user avatar
0 votes
1 answer
2k views

How can I copy all files which starts with a letter and ends with another to a specific folder?

I’m using Ubuntu-Linux terminal. I want to move from one directory to another the files that begin with the letter “T” and end with “-AN”. Besides, only “.txt” files. I want to do it in the same ...
Lara's user avatar
  • 1
0 votes
0 answers
328 views

rename multiple subfolders (not files) to parent directory name

I've searched for a solution for this, but everything I found relates to renaming files in a subfolder. I want to rename only the subfolders in multiple directories to the names of the parent folders ...
delta1071's user avatar
-4 votes
2 answers
143 views

mv renaming files deleted it [closed]

if i had a playlist filled with music, i would want it to shuffle and play because i wouldn't want to hear the same song order over and over again as it gets old real fast.. same thing here but with ...
bruh's user avatar
  • 1
-3 votes
2 answers
647 views

I want to delete all files in a particular directory which are smaller than a specific size

I want to delete the files in a particular directory which are smaller than than a specific size. For example, I have five files on a server: File1.20221001 size:-1430KB File1.20221002 size:-1320KB ...
Basavaraj Pn's user avatar
3 votes
2 answers
866 views

How to check file size and then echo?

Currently I'm trying to check file size from reading a directory read directory dirsize=$(du -sh $directory) if [[ "$dirsize" -ge 2MB ]]; then echo 'High' elif [[ "$dirsize" -...
user avatar
0 votes
0 answers
34 views

only highlighted items in a loop

I can write a little loop in Ubuntu 20.04 terminal that will act against several files, such as this command line: for x in z1*.png; do ext="${x:2}"; extnew="${ext%.png}.jpg"; ...
Bikermagi's user avatar
0 votes
1 answer
4k views

How to Replace Files?

In current directory I have a file called file.txt with the contents: new and under the current directory there is a folder named inner with a file called file.txt with the contents: old How can I ...
john's user avatar
  • 1
0 votes
1 answer
577 views

Renaming mounted folder gives "Permission denied"

I have 5 different drives in my PC which are located at /home/mnt/FOLDERS and are by default labelled alphanumerically. Now I want to rename them and I tried using mv, rename, sudo commands, which ...
Sunil's user avatar
  • 19
0 votes
1 answer
484 views

How to remove dot from multiple folders

I have several folders that i want to hide. In my case just by appending a dot at the start of the folder name serves the purpose. In case of single folder i can just use the command mv folder .folder ...
mahfuj asif's user avatar
0 votes
0 answers
72 views

Rename files and move to parent directory and delete empty subdirectories

ls */*/* The output of the above command is shown below: HP14_107_Ch/10785/outs: metric_summ.csv HP15_746_Ad/10746/outs: metric_summ.csv HP16_317_TD/10787/outs: metric_summ.csv I want to rename ...
botloggy's user avatar
  • 101
0 votes
6 answers
369 views

delete 50 random rows in a txt files that have their second column labeled as 0

I want to use the terminal commands for deleting 50 random rows from a txt file that is tab separated and has these sample rows where the second column is 0. The value in the second column is either 0 ...
Mona Jalal's user avatar
  • 4,605
1 vote
2 answers
2k views

How to create a new file / an empty file using command or shortcut or without command?

How to create a new file / an empty file using command or shortcut or without command? Like To create new Folder, shortcut: Ctrl + Shift + N Right click and create New Folder
Sahil Thummar's user avatar
2 votes
3 answers
2k views

How would I create a list of sub-folders in a given folder without the full path?

The following in a bash script: find /Volumes/SpeedyG -type d >> file.txt ...works well to list the folders in that path in a text file, /Volumes/SpeedyG/folder1 /Volumes/SpeedyG/folder2 /...
Jon Griffith's user avatar
2 votes
1 answer
186 views

how to recursively remove files from one folder if its file name doesn't appear in another folder

I have two folders where one contains txt files and the other .jpg files with the exact name. However, txt files are much more than jpg files. folder_1/00.txt folder_1/01.txt folder_1/02.txt ...
bit_scientist's user avatar
0 votes
0 answers
36 views

Copy new created file to annother folder

I have folder A where a new pdf file is created automatically at irregular time occurrence from an external process. This is my archive folder. It should remain untouched. I need to make a copy of ...
Ardit's user avatar
  • 1
0 votes
1 answer
784 views

Finding largest file in a directory but only files not directories

With this code I can find largest files in /usr directory which includes directories as well du -a /usr | sort -n | tail -n 2 But I want only files not directories what can I do?
kekekeke's user avatar
0 votes
1 answer
59 views

How to create a file with the following structure?

Consider the following rows: E i -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0 U GEV MM V -1 0 0 0 0 0 0 1 0 P 1 535 0.0000000000000000e+00 0....
John Taylor's user avatar
0 votes
0 answers
20 views

Moving files to other drive as previous OS stopped working [duplicate]

I need some help with moving all the contents of my C: drive to a folder on another drive in the computer and I am trying to use Ubuntu now as my attempts with Zorin failed. Can I somehow just create ...
Diana Caven's user avatar
2 votes
1 answer
3k views

display the filenames with 4 or more characters using ls

How to display the filenames with 4 or more characters using the ls command
ben sunny's user avatar
-1 votes
3 answers
2k views

How to list all ASCII files present in a directory?

I want to list all ASCII files that are without extensions(.txt) in my present working directory(home). I started with the ls command in the terminal but i don't know what i should put in the options ...
skekmal's user avatar
  • 165
0 votes
1 answer
1k views

cat : Do not read stdin if no input file is given on the command line

I have a script that concatenates files with cat. It contains roughly the following line that hangs the script in reading the standard input if the directory contains no files: cat /path/to/dir/* > ...
Serge Rogatch's user avatar
2 votes
3 answers
727 views

Sort files according to the name containing numeric values

I have files in my system like this - -rw-r--r-- 1 abc abcadm 14852497 Jul 23 01:11 ABCD_72_3_20210722_163502.csv -rw-r--r-- 1 abc abcadm 14853145 Jul 23 01:11 ABCD_72_1_20210722_163502.csv -...
Josph's user avatar
  • 21
2 votes
1 answer
226 views

why is output different of counting files?

I just want to count all the files in a directory. I used two method what I found: tree /home/bkp Whit this method the output is 2177879 file. find /home/bkp -type f | wc -l And with that one is ...
Márton Stark's user avatar
-1 votes
1 answer
2k views

Recovering a moved file in ubuntu

I meant to copy a file from one directory to another. Instead, I moved it using the mv command. I made a lot of changes to this file and now realize that I have lost the original file. Is there a way ...
user32882's user avatar
  • 191
1 vote
1 answer
3k views

How to write all file name in a text file and output to a different folder (directory)?

I have a folder with about 5000 files. I want the file name into a text file. I tried ls >> Out_file.txt but I want the output file to be saved in a different directory/folder.
Nasimul Hasan's user avatar
0 votes
1 answer
198 views

Hide files and folders from specific apps only

I want to make a folder invisible to just one specific application. Is there any way to do that? I want the folder to be visible to everything else on the system, just not the one specific application....
Lite Riyusaki's user avatar
1 vote
5 answers
426 views

How to differentiate between a file without an extension and a folder without using `cd`?

What is the difference between a file without an extension and a folder? What I mean exactly is that when I create a file in the terminal, for example: touch somefile then delete that file and create ...
trojan's user avatar
  • 44
0 votes
1 answer
2k views

How to copy multiple files to a new folder in a new path in one command?

[These are the files I want to copy over][1] Example command I have tried but does not work: cp permanent_waiver_* /existingpath/newfolder1/newfolder2 This would give me error like no such file or ...
Min's user avatar
  • 1
0 votes
2 answers
196 views

How to copy files into a new file

How to copy files from one file to another file that has contents I want to keep? In other words, I want the contents of file1 to go in file2 but the info in file1 to be added to the existing stuff in ...
Elon_s_mom's user avatar
-1 votes
1 answer
65 views

how to copy a file to another file in separate directories?

So I have created to vm's with the ubuntu 16.04 version. I'm trying to copy my public key into the authorized_keys file, how I have done this is with the command cp id_rsa.pub home/vagrant/.ssh/ I ...
user2152012's user avatar
0 votes
0 answers
226 views

Nautilus opening from terminal but not upon clicking

I am currently using Ubuntu 20.04 LTS. Whenever I am clicking on the 'Files' icon in the Unity launcher or from the ubuntu dock, a buffering icon appears but Files-Manager (Nautilus) never gets ...
atanughosh01's user avatar
0 votes
1 answer
346 views

Transfer files from multiple directories into a single one

I have some folders, for example /Desktop/tat, /Desktop/sac and /Desktop/ras, each of which has many files of different formats. I want to transfer all the data from these folders to a new one, named /...
Tatha gat's user avatar
0 votes
1 answer
228 views

What is include.txt and exclude.txt in my Downloads folder?

My Downloads folder has two files that I'm not sure what they are there for: "include.txt" and "exclude.txt." "include.txt' only shows "sources/boot.wim." "...
salmmus's user avatar
  • 83
0 votes
2 answers
2k views

The Linux command line for beginner | Creating folders and files

I'm trying to go through the tutorial for creating folders and files, however when I followed the instructions I'm getting a different result. When I type ls it shows a bunch of stuff instead of dir 1 ...
Ronnie T.'s user avatar

1
2 3 4 5
10