1
vote
2answers
448 views

Command not found problem in Linux-Ubuntu terminal

My friend is having problem in trying to call make to compile an application which both me and a second friend have previously successfully compiled. The file uses a "linux-devkit" pack that possess ...
3
votes
1answer
82 views

ext4, why 70k file takes 88 blocks

[root@xx]# cat -n create_extents.sh 1 #!/bin/bash 2 3 if [ $# -ne 2 ] 4 then 5 echo "$0 [filename] [size in kb]" 6 exit 1 7 fi 8 9 ...
2
votes
4answers
848 views

Bash script to output path to USB flash memory stick

How would I return (output) the path to any USB flash memory stick(s) connected to the local computer using bash (Ubuntu and Linux Mint)? Background: I'm providing users with an automated backup ...
0
votes
0answers
27 views

What do the number in the file metadata mean [duplicate]

I typed ls -l in the terminal to get the file metadata of all files in the current folder What do the circled number : 1 & 2 represent in regard to the file metadata ???
1
vote
2answers
239 views

How to batch clean filenames containing invalid characters

I have a larger directory with files whose filenames contain special characters such as line breaks. The origin of these characters is seemingly that I copied and pasted text from within pdf files ...
6
votes
5answers
915 views

How does one find out how many bits a file has in one command?

I know I can use ls -lat to find out how many bytes has a file and then multiply by 8 to find out how many bits. But is this possible in only one command line?
1
vote
1answer
107 views

Create Relative Symlink Inside Relative Symlink

I've been browsing for a minute now trying to find a way to create a relative symlink inside a relative symlink, and what I mean by that is this... I have my CakePHP Templates Skeleton as a symlink ...
3
votes
1answer
91 views

Where to put scripts only to be called by another script?

I've written a basic command line application composed of multiple bash scripts. One of these is intended to be run by any user of the computer, so I understand the correct location for this would be ...
1
vote
1answer
722 views

Identify text/ascii files in Linux/Solaris

I have a little project to build bash script that search in the OS ( Linux/Solaris ) the current IP address from files and replace them with other IP address. The problem is that IP address could be ...
23
votes
1answer
29k views

How to determine the filesystem of an unmounted device? [duplicate]

Possible Duplicate: Find filesystem of a partition from a script How to show the filesystem type via the terminal? I'm looking for a command that yields the filesystem type as mount would ...
0
votes
1answer
109 views

Filesystem writes seemingly lost

I've been experimenting with tcpdump, and I've found some very bizarre filesystem behavior. It doesn't look to be a tcpdump problem as I'll explain in a second. The following command produces no ...
6
votes
3answers
476 views

Bash autocomplete gives different file name than ls

An incredibly strange thing just happened. Through a serious typo, I entered cp filename.xsl .^?~ Yeah, that's right, dot-caret-questionmark-tilde! Truth is stranger than fiction. It gets weirder. ...
0
votes
2answers
2k views

How can I rename all files in the current directory having a particular extension to another extension? [duplicate]

Possible Duplicate: Renaming multiple files (changing extension) Suppose that in my current/working directory I have five files: file1.xvg file2.xvg file3.xvg file1.eps file2.eps Is ...
4
votes
3answers
18k views

How can I delete all files with a particular extension in a particular folder?

If I set the current/working directory (navigating to it using cd) to some particular directory and then type: rm *.xvg What will this command do? Is it true that the above command will only delete ...
0
votes
1answer
201 views

Moving Data From Old System to New System via NFS Mount

My old system was running RHEL 5,(systemold.blah.blah), and I wanted to update the server with as little downtime as possible, so I built out a new system (systemnew.blah.blah) and put RHEL 6 on it. ...
1
vote
2answers
3k views

How to write a file at various offsets to a filesystem partition with dd command

Requirement I want to write a file at various offsets into the partition Partition /dev/part2 is mounted at /mypart I tried the command below: dd if=/dev/urandom of=/mypart/aaa bs=1024 seek=0 ...
2
votes
2answers
299 views

Simultaneously move long list files to new location

I'm using a wonderful program called ExifTool to recursively rename a large batch of files. Here is example usage: $ exiftool -r -ext JPG '-FileName<CreateDate' -d %Y%m%d_%H%M%S.jpg . Error: ...
2
votes
0answers
98 views

“cd //” and “cd /” what is the difference? [duplicate]

Possible Duplicate: unix, difference between path starting with '/' and '//' If I make a cd // followed by a pwd I see: # cd // # pwd // why is that? what's the differece ...
10
votes
2answers
3k views

Why is deleting files by name painfully slow and also exceptionally fast?

Faux pas: The "fast" method I mention below, is not 60 times faster than the slow one. It is 30 times faster. I'll blame the mistake on the hour (3AM is not my best time of day for clear thinking :).. ...
5
votes
4answers
5k views

Is it possible in bash, to start reading a file from an arbitary byte count offset?

I want to locate a date which is somewhere in an 8 GB log (text). Can I somewhat bypass a full sequential read, and first do binary splits of the file (size), or somehow navigating the filesystem ...