Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-1 votes
1 answer
91 views

find a file name using command line

I would like to determine the location of a file using command-line. I have tried: find ./tor.keyring I must be missing something here
Rye Moe's user avatar
0 votes
1 answer
86 views

ls / hangs indefinitely

This problem started just today: I tried opening nautilus, and it didn't open. Then I opened ranger, and it didn't open. Dolphin also didn't work. Since I needed to do something on /etc, I just opened ...
Julio P.C.'s user avatar
0 votes
1 answer
65 views

Listing Folders and Files with the same name

I have a folder with extracted ZIP files in it. (Extracted ZIP folders are the same name as the ZIP file without ZIP in the folder name Example: File1.zip extracts to the file1 folder I need to show ...
Brian Jester's user avatar
0 votes
0 answers
50 views

Folders created in terminal not showing with ls or in the GUI

I'm new to Linux so I'm following a guide. I've been trying to create a folder unraidshare1 in the media directory: sudo mkdir -p /media/unraidshare1 No error message but no folder shows up in the ...
flexone's user avatar
1 vote
1 answer
122 views

accidentally moved almost all my files in a new directory, is it the end for me?

I was working on a big Latex project and I wanted hide all the file which are not .tex, .pdf, or .png to see clearer in my directory browser. I used the following script : #!/bin/bash # Create a ...
Mc_PanBagnat's user avatar
1 vote
2 answers
398 views

How to count subfolders containing numbers?

How can I use Terminal to count all direct subfolders in a directory that contain numbers? So it shouldn't be counted recrusively.
D-T's user avatar
  • 487
0 votes
0 answers
92 views

How to copy an existing specific file in a directory into a newly created subdirectory from command prompt using shell script

I'm having a little issues trying to make a copy of a pre-existing file (specifically java) from the current directory to a subdirectory (and some copies to its subdirectory and so on depending on the ...
Casey Collins's user avatar
0 votes
1 answer
102 views

How to change directory to a filename with spaces within a loop

I'm not sure how to go about this, but I've been trying to loop through different directories to make a number of files. Example: In the current directory, there are 3 directories: Roman Empire Casa ...
Casey Collins's user avatar
0 votes
1 answer
1k views

Folder not showing up showing up with `ls`

I have a folder I can cd into by simply using cd /path. However, when I use ls, the folder doesn't show up, and it's not hidden, meaning that ls -a doesn't make it appear, either. What could account ...
snapcrack's user avatar
  • 307
-1 votes
1 answer
218 views

Rename and add a number to all folders in a directory

I have a simulation folder on hpc which contains time directories from 0 to 50 with a step of 0.1 (so 501 folders in total with their names as 0, 0.1, 0.2.. and so forth). Example output of ls: 0 0.1 ...
rku's user avatar
  • 13
0 votes
1 answer
491 views

Bash script with different CWD from parent shell?

I'm doing a puzzle for my computer science class where I need to execute the binary /challenge/executable via a shell script, from the CWD of /tmp/exampledir, with the shell's CWD being a different ...
SpaghettiMan's user avatar
1 vote
2 answers
569 views

Changing a folder name that has a space in it [duplicate]

I need to Change a folder name Word Press into wordpress. It gives an error because I have mistakenly written the folder name in two parts, which is not recognized as one name. What can I do terminal ...
babs's user avatar
  • 19
6 votes
1 answer
856 views

Why does ls show different size for some directories (not 4k)?

While ls shows most directories having a size of 4.0K, some directories have different sizes, as shown in the output below: drwxr-xr-x 8 root root 4.0K Aug 13 2022 room drwxr-xr-x 2 root root 138 ...
randall's user avatar
  • 71
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
-3 votes
1 answer
158 views

how do i navigate in the terminal [duplicate]

i am new to linux and i am confused on how to navigate to and from between root@2c00d30f31ad:/ and root@2c00d30f31ad:~# Here is what i am facing: root@2c00d30f31ad:/alx-pre_course# cd ...
TAUSI TSONGA's user avatar
2 votes
1 answer
2k views

How to rename multiple files and folders recursively that include * and other symbols not valid for filenames/folders? [duplicate]

For somewhat reason, my Ubuntu Mate 20.04 let me include * and other symbols apparently not valid for a filename or folder. But now I need to copy a lot of archives (like 15,000) to another PC. I don'...
Silver's user avatar
  • 21
3 votes
1 answer
126 views

How can I list files in category - with streaming, so command starts showing something quickly also if folder has millions of files

I have folder that apparently has millions of files inside it. As result, dir command is running for minutes already without displaying anything. I checked dir --help and tried to search for solution. ...
reducing activity's user avatar
10 votes
3 answers
39k views

How to access Windows files from Linux in WSL?

I'm starting to learn how to use the terminal with Ubuntu on WSL (Windows). Just from the very beginning of the course it says that if you use the ls command it should show you your "home" ...
Paloma's user avatar
  • 101
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
0 votes
1 answer
367 views

How to set download directory for Opera using Terminal in Ubuntu. Opera settings offer to select a directory navigating, but then changes it

How to set the download directory for Opera using Terminal in Ubuntu. Inside Opera, in settings, a directory can be selected navigating, but Opera changes it instantly for another path/directory. ...
Armando Rubke's user avatar
0 votes
1 answer
5k views

Why does "ls --all --recursive -1 *.htm*" only list files in current directory?

In Terminal I do this command: ls --all --recursive -1 *.htm* or this: ls -a -R -1 *.htm* But it only lists the html-files in the current directory...?! According to 'man ls' that option has this ...
Henrik R.'s user avatar
  • 1,059
0 votes
1 answer
1k views

Copying file with the same name from different directories to the directory before

I have a set of 120 files, all with the same name,contig.fa which are located in the hierarchy of Main Directory 1 Subdirectory 1 file.fa Main Directory 2 Subdirectory 2 file.fa I ...
veridian21's user avatar
1 vote
1 answer
154 views

Copying folder with ignore list throws error when path is in variable

I just want to copy a folder by omitting some content. So that works: copy /stuff dir and omit foo and moo folders inside of it cp -r ./myDir/stuff/!(foo|moo) "$destination" and that doesn'...
Bat Man's user avatar
  • 111
-1 votes
1 answer
31 views

why when i enter to the directory /ok/oky the cmd ls -l test1.txt work why it does'nt work directly "ls -l /ok/oky/test1.txt [duplicate]

Ubuntu server 20.04 TLS Q: why when i enter to the directory /ok/oky the cmd ls -l test1.txt work why it does'nt work directly "ls -l /ok/oky/test1.txtenter image description here
Firas Bougrine's user avatar
1 vote
1 answer
417 views

moved /usr/bin to Downloads/ [duplicate]

I accidently moved my /usr/bin/ folder to Downloads using the following command. sudo mv /usr/bin/ Downloads/ I saw a similar problem like this here But that doesnot work, because I don't have access ...
Abhilekh Gautam's user avatar
0 votes
0 answers
264 views

How to execute a command on a single file in a directory whilst looping though the directories recursively

I have the following structure / Cardio /../ High /../ High / download.txt /../ Low /../ Low / download.txt /../ Medium /../ Medium / download.txt / Warm / Warm / download.txt / Cool / Cool / download....
pee2pee's user avatar
  • 151
1 vote
4 answers
4k views

How can I get the path of directory in which the command is running?

Suppose there is a bash file named "uploadme" in the /usr/bin folder. I am using that file as a command, and passing the file names as a command line argument, in any subdirectory of my home ...
Aditya Vaste's user avatar
-1 votes
1 answer
3k views

How do I search for a certain folder located inside the root directory?

I'm specifically looking for the command equivalent of sudo find / -name filename for searching folders instead of files in the terminal. Suggestions with a better set of commands for achieving the ...
skekmal's user avatar
  • 165
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
1 answer
1k views

Change default directory in terminal started with shortcut but not in visual studio code

I'd like to start in a different directory when I open a terminal using ctrl + alt + T. I've already tried the method adding a line with cd command in .bashrc. It works well, but then when I open ...
Tun Huang's user avatar
0 votes
1 answer
2k views

How can I get an output containing only the size for a directory?

How to get directory and its subdirectories size? I tried du -sh . But it also prints path. I need a command that doesn't print path. Like: $command 50kB
evilja's user avatar
  • 17
-1 votes
1 answer
812 views

after changing language , folder not shown when being created by command line

i create a new folder or document with the terminal,like mkdir test By using 'ls', i make sure that the folder is created successfuly. But it does not show in the graphical view. So, l try to create ...
Gerry's user avatar
  • 1
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
1 answer
566 views

Arrow keys and | less

I'm new to Ubuntu and I was playing around in the terminal. Not sure what I stumbled into with two things: I'm in /bin and when I type the command dir | less it displays the content in two ...
Meester Moo's user avatar
2 votes
0 answers
90 views

What is the directory "//"? [duplicate]

My teacher asked me why directory "//" (double-slash) exists. I know that the // is the same as /. I search for it and found many answers (// was created for compatibility with older Unix ...
Guilherme Silva's user avatar
0 votes
2 answers
1k views

How to copy a file from a subdirectory into another subdirectory?

I have a directory, Documents with 2 subdirectories, A and B. I'm trying to copy a file from subdirectory A to subdirectory B.
Youshraah's user avatar
2 votes
2 answers
4k views

How to get to the Windows Desktop in WSL?

I want to work in desktop directory from Ubuntu terminal in Windows 10,but I'm unable to open Desktop directory from terminal. My Ubuntu is installed on the C: Drive but as i mentioned i want to work ...
Shyamji Tiwari's user avatar
1 vote
2 answers
12k views

Shortcut to open the terminal specific directory

I'd like to know the shortcut that lets you open a terminal window in a specific directory just like when you press the left button on it and you click on 'Open in terminal' in the pop-up menu. Thanks ...
DBG's user avatar
  • 11
1 vote
2 answers
635 views

Ubuntu CLI, replace a long filepath/filename with a shortcut

I have a long path to some of my files and I don't want to type and/or use the Tab-key as much when using it with commands in the Terminal. So I want to add "shortcuts" to some of them (both ...
Ola Ström's user avatar
0 votes
0 answers
942 views

ls or ll listing without permissions and hardlinks

I need recursive listing of directories for my DVD backups. The prefect format is following: Name of the directory: subdirectory0/ subdirectory1/ size date time name0.txt size date time name1.sh size ...
xerostomus's user avatar
  • 1,030
1 vote
0 answers
2k views

ls -a or ls -lR shows empty result

at my /usr/local/lib/python3.8/dist-packages, I run sudo ls -a and it shows empty: $ sudo ls -a . .. With ls -lR it also shows empty: $ sudo ls -lR .: total 0 But there is actually stuff there when ...
Phạm Huy Phát's user avatar
2 votes
2 answers
1k views

How to find same subfolders in two folders on first level only?

Scenario: 2 main folders, that may have subfolders with the same names (I do not know what names might be duplicated, that's what I am trying to find) the subfolders have MANY other files & ...
jave.web's user avatar
  • 420
0 votes
3 answers
1k views

No command executes when i deleted /lib64

I executed command rm -rf * when i was in lib64 or a directory inside it. (Through comments/answers problem is that i deleted ld-linux-x86-64.so.2 and i don't have a temporary one inside /var/lib64) (...
PooiaFerdowsi's user avatar
1 vote
0 answers
111 views

Cannot remove a directory on NTFS file system even I used "rm -rf"

I cannot remove a directory called “系统漏洞补丁”(please don't care the name of it) on Windows anyway, so I came to Ubuntu 20.04 LTS and tried to remove it. But even I used rm -rf 系统漏洞补丁 . It said: rm: ...
Chen-Y0y0's user avatar
2 votes
2 answers
3k views

How to solve "The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable" error?

I've installed Ubuntu 20.04.3 LTS and installed Anaconda3, but I had to uninstall Anaconda3 since some problem occurred. I removed it using this command as root and from the /home/user directory: # rm ...
JB.Thilipkumar's user avatar
1 vote
2 answers
2k views

How to remove directories that have numbers as file names in Ubuntu using command line?

I have a directory where there are subdirectories which have numbers as directories. For example I have a parent directory test now I have some subdirectories like 1,2,3,4,5,6,7. Now I have a local ...
Space Impact's user avatar
2 votes
0 answers
2k views

ls (list) not showing all the files

A few days ago I was trying to see a few files in a directory after trying the ls command, and noticed some of them were missing. After retrying the command all files showed up. However this same ...
vitoruser'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
519 views

How to copy all the files inside the directory to another folder inside the directory with terminal?

I copy the files inside a folder to another folder inside the directory like this : cp -a folderone/ foldertwo Now how can I copy all the files in the directory to foldertwo in the directory ?
Mehdi Faraji's user avatar

1
2 3 4 5
9